                        (do
                          (dbg-println :error "ERROR, not currently supported plant-fn type=" type)
                          nil))
-        pclass-ctor_ (if (= (:type pclass-ctor_) :arg-reference)
-                       (let [param (:name pclass-ctor_)]
-                         (first (filter #(= (:param %) param) pargs)))
-                       pclass-ctor_)
+        _ (dbg-println :trace "RPC pclass-ctor_" pclass-ctor_)
         ;; pclass-ctor_ (cond
         ;;                (= pclass ::unknown) ;; matching method in pargs?
         ;;                ;; (let [plant-fn_ (get-in ir irks)

                                          (do (dbg-println :warn "GHMS Can't resolve name" name "to a pclass")
                                              name))))
                                    ;;else :plant-fn-field
                                    (get-in ir [mpclass :fields field :initial :pclass]))
                      plant-fn-primitive?
                      (get-in ir [plant-class :methods method :primitive])
                      _ (dbg-println :debug "plant-class" plant-class "plant-fn-primitive?" plant-fn-primitive?)

(defn find-methods-that-expand-task [ir task]
  (let [{:keys [type pclass name arguments]} task
        ;; all-methods (seq (get @*htn-methods* pclass))]
        ;; all-methods (if (htn-isa? type :htn-nonprimitive-task)
        ;;               (find-candidate-methods ir pclass name))
        all-methods (if (nil? pclass)
                      (do (dbg-println :error "FMTET pclass is nil!!!") [])
                      (if (htn-isa? type :htn-nonprimitive-task)
                        (find-candidate-methods ir pclass name)))]
    (dbg-println :debug "FMTET" name "TYPE" type ;; DEBUG
             "PCLASS" pclass "ALL" (map first all-methods))
    (when-not (empty? all-methods)
