         (log/trace (str "moreover-comp:  parent value: " (strip-refs (get-in parent (fail-path result)))))
         :fail))))
 
-(defn overh [parent head morph]
+(defn overh
   "add given head as the head child of the phrase: parent."
-  (when (map? parent)
+  [parent head morph]
+  (when (and (map? parent)
+             (map? head))
     (do
-      (log/trace (str "overh: parent: " (strip-refs parent)))))
+      (log/debug (str "overh: parent: " (strip-refs (dissoc parent :serialized))))
+      (log/debug (str "overh: head: " (strip-refs (dissoc head :serialized))))))
 
   (cond
 

(def ^:dynamic *check-infl* true)

(defn head-pre-checks [parent child]
  (or
   (fail? (unifyc (get-in parent [:head :synsem :infl] :top)
                  (get-in child [:synsem :infl] :top)))

(defn over [parents child1 & [child2]]
  (cond (vector? child1)
        (over parents (seq child1) child2)

        (vector? child2)
        (over parents child1 (seq child2))

        (map? parents)
        (do
          (log/debug (str "parents is a map: converting to a list and re-calling."))
          (over (list parents) child1 child2))

        (nil? child2)
        (over parents child1 :top)        

        (empty? parents)
        nil

        (and (map? parents)
             (not (nil? (:serialized parents))))
        ;; In this case, supposed 'parent' is really a lexical item: for now, definition of 'lexical item' is,
        ;; it has a non-nil value for :serialized - just return nil, nothing else to do.
        (throw (exception (str "Don't know what to do with this parent: " parents)))

        ;; if parent is a symbol, evaluate it; should evaluate to a list of expansions (which might also be symbols, etc).
        #?(:clj (symbol? parents))
        #?(:clj (over (eval parents) child1 child2))

        true
        (let [parent (first parents)]
          (cond
            (nil? (get-in parent [:schema-symbol] nil))
            (throw (exception (str "no schema symbol for parent: " (:rule parent))))

            true
            (do
              (log/debug (str "over: parent: " (get-in parent [:rule]) " with schema symbol: " (get-in parent [:schema-symbol])))
              (if (= (:first parent) :head)
                ;; else, head is left child.
                (do (log/debug "over: left child (head):" child1)
                    (log/debug "over: right child (comp):" child2))
                ;; else, head is right child.
                (do (log/debug "over: left child (comp):" child1)
                    (log/debug "over: right child (head):" child2)))

              (concat
               ;; if parent is map, do introspection: figure out the schema from the :schema-symbol attribute,
               ;; and figure out head-comp ordering from :first attribute.
               (filter (fn [each]
                         (not (fail? each)))
                       (overhc parent
                               (if (= (:first parent) :head)
                                 child1 child2)
                               (if (= (:first parent) :head)
                                 child2 child1)))
               (over (rest parents) child1 child2)))))))




