               (let [{:keys [ancestry-path]} subtask
                     subtask (assoc subtask
                                    :ancestry-path *htn-plan-ancestry*)]
-                (println "about to PHT" (:name subtask)) ;; DEBUG
+                (dbg-println :debug "about to PHT" (:name subtask)) ;; DEBUG
                 (plan-htn-task ir (update-htn-object! subtask))))))))))
 
 ;; pprint-htn-object multi-methods --------------------------------------

  (reinitialize-htn-object-table)
  (reinitialize-htn-plan-map)
  (tpn/reinitialize-tpn-plan-map)
  (transform-htn ir)
  (let [[pclass pargs method args] (identify-root-task ir root-task)
        _ (println "PAMA" pclass pargs method args)
        nonprimitive-root-task (htn-nonprimitive-task
                                 {:pclass pclass
                                  :pargs pargs


;; will return subtasks, if any
;; irks are the ks to get-in the ir for the method in question (initially nil)
(defn get-htn-method-subtasks [ir pargs top-level-type mpclass mname display-name margs sub-body irks]
  (dbg-println :debug "\nGET-HTN-METHOD-SUBTASKS"
           "top-level-type" top-level-type "mpclass" mpclass "mname" mname
           "display-name" display-name "margs" margs "sub-body" sub-body "irks" irks)
  (let [number-of-subtasks (count sub-body)]
