             return false
         }
     }
+    
+//    func getAny(key: T, mediator: RMediator) -> U? {
+//        do {
+//            var current: TreeNode<T,U> = self
+//            while case .internalNode(let i) = current {
+//                var lastMax: T? = nil
+//                for (max, pid) in i.pairs {
+//                    if key <= max {
+//                        let (node, _) : (TreeNode<T, U>, PageStatus) = try mediator.readPage(pid)
+//                        current = node
+//                    }
+//                    lastMax = max
+//                }
+//            }
+//            
+//            guard case .leafNode(let l) = current else { return nil }
+//            for (k, v) in l.pairs {
+//                if k == key {
+//                    return v
+//                }
+//            }
+//        } catch {}
+//        return nil
+//    }
+    
     func get(key: T, mediator: RMediator) -> [U] {
         var elements = [U]()
         _ = try? self.walk(mediator: mediator, between: (key, key)) { (leaf) in

        return false
    }

    public func get(key: T) -> [U] {
        do {
            let (node, _) : (TreeNode<T, U>, PageStatus) = try mediator.readPage(root)

            successful += 1
        }
    }

    func firstIndex(with key: T) -> Int {
        var low = 0
        var high = pairs.count
        while low < high {
            let midIndex = low + (high - low)/2
            if pairs[midIndex].0 < key {
                low = midIndex + 1
            } else {
                high = midIndex
            }
        }
        return low
    }
    
}

public enum TreeNode<T: BufferSerializable & Comparable, U: BufferSerializable> : PageMarshalled {
