 
 (defn add
   "adds a node with one child at each level(a limb) to the children of a node"
+  ; TODO use a indexes func on a limb instead of this
   [{:keys [children triple] :as node}
    {-children :children -element :element -triple :triple
     :as limb}]

            (recur tail
                   (nth children head)
                   (+ acc (left-to-right head node)))
            (dec acc)))) ;zero-based index
      nil))

(defn indexes
  "returns a vector of numbers for each level that the index of a limb is
  located at in a node"
  [node limb]
  (loop [path [], node node, limb limb]
    (let [{:keys [children]} node

      ;does the node contain the limb
      (if (or (< index 0)
              (and (= index 0) (= (count children) 0)))
        (conj path nil)
        ;does the limb have more children
        (if (or (= (count (:children limb)) 0)
                (= (count children) 0))
