 (defn insert
   [{:keys [cfg] :as tree} key]
   (let [path (lookup-path tree key) ; don't care about the found key or its index
-        {:keys [children] :or {children (sorted-set)}} (peek path)
+        {:keys [children] :or {children (sorted-set-by compare)}} (peek path)
         updated-data-node (data-node cfg (conj children key))]
     (loop [node updated-data-node
            path (pop path)]

            [taoensso.nippy :as nippy]
            [clojure.pprint :as pp])
  (:import java.io.Writer
           java.util.Collections))

(defrecord Config [index-b data-b op-buf-size])

(defn delete
  [{:keys [cfg] :as tree} key]
  (let [path (lookup-path tree key) ; don't care about the found key or its index
        {:keys [children] :or {children (sorted-set-by compare)}} (peek path)
        updated-data-node (data-node cfg (disj children key))]
    (loop [node updated-data-node
           path (pop path)]
