             }
         }
     }
-    func contains(mediator : RMediator, key : T) -> Bool {
+    func contains(key : T, mediator : RMediator) -> Bool {
         switch self {
         case .leafNode(let l):
             for (k,_) in l.pairs where k == key {

                    if key <= max {
                        do {
                            let (node, _) : (TreeNode<T,U>, PageStatus) = try mediator.readPage(pid)
                            if node.contains(mediator: mediator, key: key) {
                                return true
                            }
                        } catch {}

    public func get(key : T) -> [U] {
        do {
            let (node, _) : (TreeNode<T,U>, PageStatus) = try mediator.readPage(root)
            return node.get(key: key, mediator: mediator)
        } catch {}
        print("*** No tree node found for root '\(root)'")
        return []
