     (if (>= ix len)
       (do
         (aset min-fill col least)
-        (let [next (inc col)]
+        (let [next (+ 1 col)]
           (if (< next tuple-len)
             (recur 0 next nil))))
       (let [cur (-> (aget keys ix)
                     (aget col))]
-        (recur (inc ix) col (if (lt cur least)
+        (recur (+ 1 ix) col (if (nilless-lt cur least)
                               cur
                               least))))))
 
-(let [fill (array)]
-  (find-least #js [#js [0 1 2] #js [nil 1 4] #js [nil 0 3]] 3 3 fill)
-  (find-least #js [#js [0 1 2] #js [8 nil 10] #js [nil 9 10]] 3 3 fill)
-  fill)
-
 (defn find-greatest [iterators keys len results min-fill]
-  (loop [ix 0
+  (loop [ix 1
          greatest (aget keys 0)
          found? true]
     (if (>= ix len)

  (next [this]
        (.next iterator))
  (seek [this key]
        (.seek iterator key)))

(defn magic-iterator
  ([tree] (let [itr (iterator tree)]
            (MagicIteratorWrapper. itr (.key itr) (.-root tree))))
  ([tree map]
   (let [itr (MagicIterator. (iterator tree) map (alength map) (array) (array) (.-root tree))]
     (.set-key itr)
     itr)))

(defn ->keys [iterators keys len]
  (dotimes [x len]

                   (if-not (nil? map-ix)
                     (aset cur-key ix (aget found map-ix))
                     (aset cur-key ix nil)))
                 (recur (+ 1 ix))))))
  (seek [this key]
        (let [ros (rewind-or-store key prev-seek nil-ixs)
              ros-ix (aget ros 0)]
          (when (identical? (aget ros 2) true)
            (.rewind this (aget ros 0)))
          (when (identical? (aget ros 1) true)
            (dotimes [x (alength cur-seek)]
              (aset cur-seek x false))
            (aset cur-seek (aget map ros-ix) (aget key ros-ix))
            (.seek iterator cur-seek)
            (.mark this ros-ix)
            (.set-key this))
          (when (identical? -1 (nilless-key-compare (.-cur-key this) key))
            (loop [ix 0]
              (when (< ix map-len)
                (let [map-ix (aget map ix)]
                  (when-not (== map-ix nil)
                    (aset cur-seek map-ix (aget key ix))))
                (recur (+ 1 ix))))
            (.seek iterator cur-seek)
            (.set-key this))
          (set! prev-seek key)
          )
        ))

(deftype MagicIteratorWrapper [iterator map]
  Object
  (key [this]
       (.key iterator))
  (val [this]
