                        :return value
                        :throw throw ;;TODO not right
                        :ended-at (trace/now))]
-      (assoc-to-recent-trees! (atom this')
+      (assoc-to-recent-trees! #spy/d (atom this')
                               parent
                               recent-trees)
       value)))
 
 (defn tr-macro
-  [path [recent-trees] mcro v]
+  [path [recent-trees] template mcro v]
+  (def rt' @recent-trees)
+
   (let [tree-atom (produce-recent-tree-atom! path
-                                    recent-trees)])
-  (swap!
-         assoc
-         :return v
-         :inner-tags [:macro mcro])
-  v)
+                                             recent-trees)]
+
+    (swap! (@recent-trees path)
+           assoc
+           :return v
+           :inner-tags [:macro mcro])
+
+
+    v))
 
 (defn tr-if-ret
   [path [recent-trees] v]


(defn xpand-fn
  [head form src-map fn-meta path parent-path]
  (xpand-fn-form head
                 (xpand-all form
                            src-map

  (if (nil? inner-path)
    (let [new-parent (get-temp-root-parent)]
      (assoc-to-recent-trees! new-parent
                              nil
                              recent-trees)
      new-parent)
    (let [new-grandparent (produce-recent-parent-tree-atom! inner-path
                                                            recent-trees)
          new-parent (-> (trace/mk-tree :parent new-grandparent)
                         (assoc :inner-path inner-path)
                         atom)]
      (assoc-to-recent-trees! new-parent
                              new-grandparent
                              recent-trees)
      new-parent)))

(defn produce-recent-tree-atom!
  [inner-path recent-trees]
  (if-let [tree-atom (get-recent-tree-at-inner-path inner-path
                                                    recent-trees)]
    tree-atom
    (mk-recent-tree-at-inner-path inner-path
                                  recent-trees)))

(defn produce-recent-parent-tree-atom!
  [inner-path recent-trees]
