                       data]
   (cond
    ; current node has children? -> first child
-   (not (empty? (:children current))) (conj current-path :children 0)
+   (and (not (empty? (:children current)))
+        (not (:closed current))) 
+     (conj current-path :children 0)
    ; not max sibling? -> go to next sibling
    (and parent-children (< current-child-idx (dec (count parent-children)))) down-path
    ; else, find next depth wise.

                                                     (assoc-in destination-path             new-destination-children)
                                                     (assoc-in (conj parent-path :children) new-parent-children)
                                                  )))))
                             (recur) 
                             )))

                        ; click events

   ; delete ------------------------------------
   [8]         :destroy-node     ;bkspace
   ; visibility of children --------------------
   [32]        :toggle-closed    ;space
   })

(defn prev-depth-path [parent-path body]
  (loop [p parent-path]
    (let [current (get-in body p)
          children (:children current)]
      (if (or (empty? children) (:closed current)) p
          (recur (conj p :children (dec (count children))))))))


