                      subset
                      (if-let [index-fn
                               (:index-fn language-model)]
-                       (do (log/debug (str "found index-fn."))
+                       (do (log/trace (str "found index-fn."))
+                           (log/debug (str "lightning-bolts: calling index-fn with rule: " (:rule parent)
+                                           " with spec: " (strip-refs (get-in parent [:head] :top))))
                            (index-fn (get-in parent [:head] :top)))
                        (do (log/warn (str "no indices found for spec: " spec))
                            []))]
-                 (log/info (str "lightning-bolts: " (get-in parent [:rule])
-                                 " : (optimizeme) size of subset of candidate heads: "
-                                 (count subset) " with spec: " (strip-refs spec)))
+                 (if (not (empty? subset))
+                   (log/debug (str "lightning-bolts: " (get-in parent [:rule])
+                                   " : (optimizeme) size of subset of candidate heads: "
+                                   (count subset) " with spec: " (strip-refs spec))))
                  (log/trace (str "lightning-bolts: " (get-in parent [:rule])
                                  " : head lexeme candidates: "
                                  (string/join ","

                                                   subset))))
                                                     
                 (let [result (over/overh parent (lazy-shuffle subset))]
                   (log/debug (str "lightning-bolts: (optimizeme) surviving candidate heads: " (count result)))

                   (log/trace (str "lightning-bolts: surviving results: " 
                                   (string/join ","

        ;; 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 (lazy-shuffle (candidate-parents grammar spec))]
        parents (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
