                      :irks)
              :incidence-set #{}
              :edges #{})
-        end (tpn/tpn-state {})
-        begin (tpn/tpn-state {:end-node (:uid end)})]
+        _ (dbg-println :debug "ERT" ert
+            "\nTASK-EXPANSIONS (" (count task-expansions)
+            ") = "
+            ;; (with-out-str (pprint task-expansions)
+            (mapv :label task-expansions)
+            )
+        top-level-choose? (> (count task-expansions) 1)
+        end ((if top-level-choose?
+               tpn/tpn-c-end
+               tpn/tpn-state)
+             {})
+        begin ((if top-level-choose?
+                 tpn/tpn-c-begin
+                 tpn/tpn-state)
+               {:end-node (:uid end)})]
     (update-htn-plan-map! ert)
     (update-htn-plan-map! net)
     (swap! *htn-plan-map* assoc :network (:uid net)) ;; ENTRY POINT

                                            :nonprimitive-task nonprimitive-task
                                            :subtasks subtasks
                                            :subtask-constraints subtask-constraints
                                            :irks irks-choice})]
                    (recur (conj methods method) (inc i))))))

            :else

          (if mname ;; else (dbg-println :debug "no more methods")
            (let [{:keys [temporal-constraints args primitive display-name body]} method]
              (dbg-println :info "  METHOD" mname "PRIMITIVE" primitive "ARGS" args)
              (when (and (not primitive) body)
                (if (and (= 1 (count body)) (= :choose (get-in body [0 :type])))
                  (dbg-println :info "  TOP LEVEL CHOOSE!")
                  )
                (make-htn-methods ir pargs true pclass-name mname display-name args body))
              )))))))

