      truncate-children max-total-depth top-level-spec)))
 
 (defn do-defaults [tree language-model]
+  (log/debug (str "calling do-defaults on tree:" ((:morph language-model) tree)))
   (if-let [default-fn (:default-fn language-model)]
-    (default-fn tree)
+    (let [result
+          (default-fn tree)]
+      (log/debug (str "result of calling do-defaults on tree:" ((:morph language-model) result)))
+      result)
     ;;
     (do
-      (log/info (str "language-model has no default function."))
+      (log/trace (str "language-model has no default function."))
       tree)))
 
 (defn add-complement-to-bolt [bolt path language-model total-depth top-level-spec

  [language-model spec depth total-depth
                       & {:keys [max-total-depth]
                          :or {max-total-depth max-total-depth}}]
  (let [grammar (:grammar language-model)
        depth (if depth depth 0)
        ;; this is the relative depth; that is, the depth from the top of the current lightning bolt.
        ;; total-depth, on the other hand, is the depth all the way to the top of the entire
        ;; expression, which might involve several parent lightning bolts.
        parents (shuffle (candidate-parents grammar spec))]
    (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
          (when (= false (get-in spec [:head :phrasal] false))
            (lazy-mapcat

  (let [result
        (filter not-fail?
                (mapfn (fn [rule]
                         (log/trace (str "candidate-parents: testing rule: " (:rule rule)))
                         (if (and (not-fail? (unify (get-in rule [:synsem :cat] :top)
                                                    (get-in spec [:synsem :cat] :top)))
                                  (not-fail? (unify (get-in rule [:synsem :infl] :top)
