             (queues/g-pq-replace! good-queue entry 
               (- (or (:cutoff (meta entry)) (:reward-to-state entry))))) ;(if-let [n  (:sanode entry)] (cutoff (:queue n)) 0)
           (.remove stack-node-depths node) ;; TODO: catchup!! 
-;          (println "Returning from" (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "With cutoff" cut (cutoff good-queue) "and cdm" cutoff-depth-map "and states" (count new-results) (count catchup) "-" (count clean) (count dirtied) (count still-dirty) "and good roots" (count good-roots) (map :reward-to-state good-roots))
+
           (println (apply str (repeat depth \ )) "Returning from" (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "With cutoffs" cut (cutoff good-queue) ", ns"  (util/map-keys spos (stitch-effect-map catchup state reward-to-state) ) (count catchup) (count new-results))   
           (assert (<= (cutoff good-queue) init-cutoff))
           

        init  (env/initial-state e)
        root  (get-sa-node cache init (hierarchy/TopLevelAction e [(hierarchy/initial-plan henv)]))]
    (loop [cutoff 0 last-cutoff 0]
;        (println "\ncutoff" cutoff "\n")
      (let [result (expand-sa-node root cache cutoff init 0.0 0 (IdentityHashMap.) 0)]
        (cond (not (empty? (:result-map result)))
                (let [[k v] (util/first-maximal-element val (:result-map result))]

              (util/assert-is (<=  (+ b-rts (:cutoff rec)) (- neg-reward)) "%s %s %s" neg-reward b-rts (cutoff (:queue b-sa)))
              (reset! (:rec-context-atom entry) (:rec-context rec))
              (doseq [n good-nodes]      
                (when (> (:reward-to-state n) (min init-cutoff (- neg-reward)))
                  (assert (>= (queues/g-pq-priority good-queue n) (:reward-to-state n))))
                (queues/g-pq-add! good-queue n (- (:reward-to-state n))))
              (doseq [n (concat nbn sbn)] 
                (queues/g-pq-add! bad-queue  n (- (:reward-to-state n))))
