private synchronized void move(){
        //Nothing to operate
        if(onOperating.isEmpty()){
            //No floors is waiting
            if(onWaiting.isEmpty()){
                status = 0;
                idle();
                try{
                    wait();
                }catch(InterruptedException ex){
                    ex.printStackTrace();
                }
            }
            //Floors are waiting
           else{
                rearrange();
            }
        }
        //On operating
        else{
            if(status ==0){
                status = 1;
                notify();
                return;
            }
            currentFloor += direction;
            if(direction>0){
                System.out.println("Up " + (currentFloor +1)+"F");
            }
            else if(direction<0){
                System.out.println("Down " + (currentFloor +1)+"F");
            }
            if(currentFloor == onOperating.peek().floor){
                floors[currentFloor].openDoor();
                floors[currentFloor].notifyGoingOut();
                notifyFloor(onOperating.remove().direction);
                waitForPerson();
            }
        }
    }