@Override
	public void run() {
		Elevator elevator = null;
		while (elevator == null) {
			if (this.currentFloor > this.requestedFloor){
				elevator = this.building.CallDown(currentFloor);
			}

			if (this.currentFloor < this.requestedFloor){
				elevator = this.building.CallUp(currentFloor);
			}
		}
		synchronized(elevator) {
			System.out.println("Rider " + riderID+ " has figured its elevator");
			boolean entered = false;
			while (!entered) {
				entered = elevator.Enter(this);
				if (!entered) System.out.println("Denied from elevator");
			}
			System.out.println("Rider " + riderID+ " has entered");
			write("Rider " + riderID + " has entered " + "E" + elevator.elevatorId);
			elevator.RequestFloor(this, requestedFloor);
			/**
			 * if the rider doesn't make a request, we force him out of the elevator
			 */
			if (this.haveRequested = false) {
				elevator.Exit(this);
			}
		}
		System.out.println("Rider " + riderID+ " has requested floor " + requestedFloor);
		elevator.Exit(this);
		/**
		 * if the rider never exits the elevator, we kill the thread using return statement and decrement the waitCount
		 */
		if(this.haveExited = false) {
			elevator.decrementCounter(elevator.getFloor());
			return;
		}
		System.out.println("Rider " + riderID+ " has exited " + "E" + elevator.elevatorId);
		write("Rider " + riderID+ " has exited " + "E" + elevator.elevatorId);
	}