   "find subset of _rules_ for which each member unifies successfully with _spec_"
   [rules spec]
   (log/trace (str "candidate-parents: spec: " (strip-refs spec)))
-  (filter #(not (= :fail %))
-          (pmap (fn [rule]
-                  (log/trace (str "candidate-parents: 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)
-                                             (get-in spec [:synsem :infl] :top)))
-                           (not-fail? (unify (get-in rule [:synsem :sem :tense] :top)
-                                             (get-in spec [:synsem :sem :tense] :top)))
-                           (not-fail? (unify (get-in rule [:synsem :modified] :top)
-                                             (get-in spec [:synsem :modified] :top))))
-                    (let [result
-                          (unify spec rule)]
-                      (if (fail? result)
-                        :fail
-                        result))
-                    :fail))
-                rules)))
+  (let [result
+        (filter not-fail?
+                (mapfn (fn [rule]
+                         (log/trace (str "candidate-parents: 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)
+                                                    (get-in spec [:synsem :infl] :top)))
+                                  (not-fail? (unify (get-in rule [:synsem :sem :tense] :top)
+                                                    (get-in spec [:synsem :sem :tense] :top)))
+                                  (not-fail? (unify (get-in rule [:synsem :modified] :top)
+                                                   (get-in spec [:synsem :modified] :top))))
+                           (unify spec rule)
+                           :fail))
+                       rules))]
+    (log/debug (str "candidate-parents for spec: " (strip-refs spec) " : "
+                    (string/join "," (map :rule result))))
+    result))
 
 (defn lazy-shuffle [seq]
   (lazy-seq (shuffle seq)))

                     subset
                     (if-let [index-fn
                              (:index-fn language-model)]
                       (do (log/debug (str "found index-fn."))
                           (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)))
                 (log/trace (str "lightning-bolts: " (get-in parent [:rule])
                                 " : head lexeme candidates: "
                                 (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
