     }
     
     private func _internalRemoveRequestByID(id: String) {
-        if let i = requests.index(where: { ($0.id == id)}) {
-            let value = requests.remove(at: i)
-            debug(message: "clearing floor: \(floor) [\(i)] request: \(value.description())")
+        if let i = self.requests.index(where: { ($0.id == id)}) {
+            let value = self.requests.remove(at: i)
+            debug(message: "clearing request \(id): [\(i)] request: \(value.description())")
         }
     }
     

                }
                
                if (open) {
                    elevator.arriveAtFloor(control: self)
                    if (elevator.floor == next.floor) {
                        _internalRemoveRequestByID(id: next.id)
                    }
                    _internalRemoveRequestsByFloor(floor: elevator.floor, direction: direction)
                    open = false
                }
            }

        if (floor == 0) {
            return
        }
        debug(message: "clearing requests for floor: \(floor), direction: \(direction)")
        _internalRemoveGoToRequests(floor: floor)
        _internalRemoveDirectionRequests(floor: floor, direction: direction)
    }
    
    private func _internalRemoveGoToRequests(floor: Int) {
        self.requests = self.requests.filter() { $0.floor != floor && $0.direction == Direction.GoTo}
    }
    
    private func _internalRemoveDirectionRequests(floor: Int, direction: Direction) {
        self.requests = self.requests.filter() { $0.floor != floor && $0.direction != direction}
    }
    
    private func _internalCallBestElevator(direction: Direction, floor: Int) -> Elevator? {
