         case .leafNode(let l):
             return ([], l, currentStatus)
         case .internalNode(let i):
-            let boundaryIndex = i.firstIndex(with: key)
+            let boundaryIndex = i.pairs.firstIndex { $0.0 < key }
+//            let boundaryIndex = i.firstIndex(with: key)
             if boundaryIndex < i.pairs.count {
                 if boundaryIndex < i.pairs.count {
                     let (_, pid) = i.pairs[boundaryIndex]

            return false
        }
        let index = pairs.firstIndex { $0.0 < key }
        if index >= (pairs.count - 1) {
            return false
        }
        let element = pairs[index]

            return nil
        }
        let index = pairs.firstIndex { $0.0 < key }
        if index > (pairs.count - 1) {
            return nil
        }
        let element = pairs[index]
