               (lightning-bolt grammar lexicon each-spec depth index morph total-depth))
             spec)
     (do
-      (log/debug (str "lightning-bolt(depth=" depth ", total-depth=" total-depth "; cat=" (get-in spec [:synsem :cat]) ")"))
+      (log/debug (str "lightning-bolt(depth=" depth "; total-depth=" total-depth "; cat=" (get-in spec [:synsem :cat]) ")"))
       (let [morph (if morph morph (fn [input] (get-in input [:rule] :default-morph-no-rule)))
             depth (if depth depth 0)        
             parents (filter #(not (fail? %)) (mapfn (fn [rule] (unifyc spec rule)) grammar))]
         (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
               (mapcat (fn [parent]
                         (if (= false (get-in parent [:head :phrasal] false))
-                          (let [candidate-lexemes (get-lex parent :head index spec)]
-                            (over/overh parent
-                                        (mapfn copy (lazy-shuffle candidate-lexemes))))))
-                            parents)
+                          (let [candidate-lexemes (get-lex parent :head index spec)
+                                results (over/overh parent (mapfn copy (lazy-shuffle candidate-lexemes)))]
+                            (log/debug (str "lightning-bolt: " (get-in parent [:rule]) ": candidate head lexemes:'"
+                                            (string/join "','" (map morph candidate-lexemes)) "'"))
+                            results)))
+                      parents)
               phrasal ;; 2. generate list of all phrases where the head child of each parent is itself a phrase.
               (if (< depth max-total-depth)
                 (mapcat (fn [parent]

            (concat phrasal lexical)))))))

(defn add-complement [bolt path spec grammar lexicon cache morph depth total-depth]
  (log/info (str "add-complement: " (show-bolt bolt path morph)))
  (let [input-spec spec
        from-bolt bolt ;; so we can show what (add-complement) did to the input bolt, for logging.
        spec (unifyc spec (get-in bolt path))

                                                                    (get-in bolt (concat path
                                                                                         [:synsem :sem :pred]))))))
                                     (str "'" (morph %) "':"
                                          (fail-path (strip-refs %)
                                                     (strip-refs (get-in bolt path)))))
                                  (take log-limit complement-candidate-lexemes)))
                
                (if (< 0 (- (count complement-candidate-lexemes) log-limit))
