            [cx cy] tops
            :let [c (env/get-var state ['blockat cx cy])]
            :when (and (< cy h) (not (= b c)))]
-       [(make-move-block-hla env nav-context
+       [(make-move-block-hla env nav-context nav-factory
                              b bx by (env/get-var state ['blockat bx (dec by)]) c cx cy)
-        (MoveBlocksHLA env goal-fn context nav-context b)]))))
-
-(deftype WarehouseTLA [env context] :as this
+        (MoveBlocksHLA env goal-fn context nav-context nav-factory b)]))))
+
+(defn make-nav-context [env]
+  (let [ [w h] (:topright env)]
+    (set (cons '[at] (for [x (range 1 (inc w)) y (range 2 (inc h))] ['someblockat x y])))))
+
+(deftype WarehouseTLA [env context nav-context nav-factory] :as this
     env/Action                (action-name [] '[top])
                               (primitive? [] false)
     env/ContextualAction      (precondition-context [s] context)
     hierarchy/HighLevelAction (immediate-refinements- [s] 
-                                 (let [goal-fn (env/goal-fn env)
-                                       [w h] (get (env/get-var s :const) '[topright])]
-                                   (possible-move-refinements env goal-fn context 
-                                     (set (cons '[at] (for [x (range 1 (inc w)) y (range 2 (inc h))] ['someblockat x y]))) nil s)))
+                                 (let [goal-fn (env/goal-fn env)]
+                                   (possible-move-refinements 
+                                    env goal-fn context nav-context nav-factory nil s)))
                               (cycle-level- [s] nil))
-
  
 
 (defn make-warehouse-tla [env]
-  (WarehouseTLA env (util/keyset (dissoc (env/initial-state env) :const))))
+  (let [nav-context (make-nav-context env)]
+    (WarehouseTLA env (util/keyset (dissoc (env/initial-state env) :const))
+                  nav-context (fn [dx dy] [(make-simple-nav-hla dx dy nav-context)]))))
 
 (defn simple-warehouse-hierarchy [#^WarehouseEnv env]
   (hierarchy/SimpleHierarchicalEnv env [(make-warehouse-tla env)]))
+
+
+(defn make-warehouse-tla-fancynav [env]
+  (let [nav-context (make-nav-context env)
+        [w h]       (:topright env)]
+    (WarehouseTLA env (util/keyset (dissoc (env/initial-state env) :const))
+                  nav-context (fn [dx dy] (make-fancy-nav-plan dx dy h)))))
+
+(defn simple-warehouse-hierarchy-fancynav [#^WarehouseEnv env]
+  (hierarchy/SimpleHierarchicalEnv env [(make-warehouse-tla-fancynav env)]))
 
 ;; TODO: heuristic
 ;; TODO: missing precond handling && preconds ? 

                       (when block [['on block] (or (get stack y) nil)])
                       [[['blockat x y] (or block nil)]
                        [['someblockat x y] (if block true false)]]))))
       (into {} (for [stack goal-stacks, [a b] (partition 2 1 stack)] [['on b] a]))))))




;;;;;;;; hierarchy ;;;;;;;;;;;;

;; TODO: fix nav dependence growth? 

(deftype NavHLA [name context dest] :as this
  env/Action                (action-name [] name)
                            (primitive? [] false)
  env/ContextualAction      (precondition-context [s] context )




(deftype WarehouseEnv [init goal topright] :as this
 env/Env
  (initial-state [] init)
  (actions-fn []
