     var direction: Direction = Direction.Idle
     var floor: Int = 1
     var type: RequestType
-    
-    init(direction: Direction, floor: Int, type: RequestType) {
+    var destinationAction: (() -> ())?
+    
+    init(direction: Direction, floor: Int, type: RequestType, block: @escaping () -> ()) {
         self.direction = direction
         self.floor = floor
         self.type = type
+        self.destinationAction = block
     }
     
     init(floor: Int) {

    }
    
    func run() {
        control.callElevator(request: Request(direction: Direction.Up, floor: 3, type: RequestType.Floor))
        control.callElevator(request: Request(floor: 4))
        control.callElevator(request: Request(direction: Direction.Down, floor: 8, type: RequestType.Floor))
        control.callElevator(request: Request(floor: 2))
        control.callElevator(request: Request(direction: Direction.Up, floor: 1, type: RequestType.Floor))        
        control.callElevator(request: Request(direction: Direction.Down, floor: 5, type: RequestType.Floor))
        control.callElevator(request: Request(direction: Direction.Up, floor: 5, type: RequestType.Floor))
        control.callElevator(request: Request(floor: 1))
        control.callElevator(request: Request(floor: 9))
        control.callElevator(request: Request(direction: Direction.Down, floor: 10, type: RequestType.Floor))
        control.callElevator(request: Request(floor: 1))
        sleep(20)
        control.callElevator(request: Request(direction: Direction.Down, floor: 3, type: RequestType.Floor))
    }
    
    func description() -> String {
        return "<Building id: \(short_id()) floors: \(floors)>"
    }
}

Building(floors: 10).run()

        print("elevator: \(short_id()) closing doors at floor: \(floor)")
   }
    
    func arriveAtFloor(request: Request) {
        open()
        sleep(2)
        request.destinationAction?()
        close()
    }
    
