public boolean loadContainer(Container container, Truck truck, float tpf) {
        
        switch (switchcase) {
            case 0: 
                if(timer.counter(30, tpf)) // after 30 seconds the container is attached to the crane
                     switchcase++;         //next case
                break;
            case 1:
                if(container.getLocalTranslation().y < 2.5f / 3 * 4) {//here the container gets lifted up
                    container.move(0, tpf * 0.055f, 0);}
                
                if(timer.counter(60, tpf)) // while the container gets lifted a timer starts when it reaches 60 the 
                {                          //container is supposed to be at the top if not it will be set there
                    this.attachChild(container);// attach the container to the crane
                    container.setLocalTranslation(0,2.5f / 3 * 4, 2.5f / 3 * 1.5f);//set the correct coordinates to the container within the crane 
                    container.rotate(0, FastMath.PI / 2, 0);// rotate the container
                    switchcase += 1;// next case
                }
                return false;
            case 2:
                if (this.moveBack(tpf)) {// move the crane with the container towards the truck
                    switchcase += 1;// next case
                }
                return false;
            case 3:
                if(container.getLocalTranslation().y > 2.5 / 3) // lower the container until it reaches the right height
                    container.move(0, -0.048f * tpf, 0);
                
                if(timer.counter(90, tpf)){ // while the container lowers a timer starts when it reaches 90 the 
                                            //container is supposed to be at the bottom if not it will be set there
                    this.detachChild(container); // detach the container
                    truck.attachChild(container); // attach to the truck
                    container.setLocalTranslation(-0.9f, 0.65f, 0);// set the container to the right location on the truck
                    switchcase += 1; // next case
                    drive = false; // set drive false (this is a helper, so the truck won't move twice)
                }
                return false;

            case 4:
                if (this.moveForward(tpf)) //if the crane is back at the start position the truck is allowed to move
                    drive = true;
                
                if( drive == true){ //if the truck is allowed to move it wil move
                    if (truck.departure(tpf)){ //the truck will leave, and wil 'spawn' back at the beginning
                        truck.detachChild(container); // remove the container from truck
                        switchcase = 0; // end the switch case
                        return true; // return true so the method will stop with repeating
                    }
                }
                return false;
        }
        return false;

    }