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

    public func contains(key : T) -> Bool {
        do {
            let (node, _) : (TreeNode<T,U>, PageStatus) = try mediator.readPage(root)
            return node.contains(mediator: mediator, key: key)
        } catch {}
        return false
    }

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