                              input))]
     (cond
       (= input :top) input
+      (= input :fail) :fail
       true
-      (let [activity   (get-encyc input :activity)
-            animate    (get-encyc input :animate)
-            artifact   (get-encyc input :artifact)
-            buyable    (get-encyc input :buyable)
-            city       (get-encyc input :city)
-            clothing   (get-encyc input :clothing)
-            consumable (get-encyc input :consumable)
-            drinkable  (get-encyc input :drinkable)
-            edible     (get-encyc input :edible)
-            furniture  (get-encyc input :furniture)
-            human      (get-encyc input :human)
-            part-of-human-body (get-encyc input
-                                          :part-of-human-body)
-            pet        (get-encyc input :pet)
-            place      (get-encyc input :place)
-            time       (get-encyc input :time)
-            ]
-        (let [merged
-              (cond (= input :fail) :fail
+      (let [merged
+            (unify input
+                   (reduce unify (impl-list input)))]
+        (log/debug (str "sem-impl so far: " merged))
+        (if (not (= merged input)) ;; TODO: make this check more efficient: count how many rules were hit
+          ;; rather than equality-check to see if merged has changed.
+          (sem-impl merged original-input) ;; we've added some new information: more implications possible from that.
 
-                    true
-                    (merge input
-                           (reduce merge [activity animate artifact buyable city clothing consumable drinkable
-                                          edible furniture human
-                                          pet place time])))]
-          (log/trace (str "sem-impl so far: " merged))
-          (if (not (= merged input)) ;; TODO: make this check more efficient: count how many rules were hit
-            ;; rather than equality-check to see if merged has changed.
-            (sem-impl merged original-input) ;; we've added some new information: more implications possible from that.
-
-            ;; else, no more implications: done.
-            (do
-              (log/debug (str "sem-impl:" (strip-refs original-input) " -> " (strip-refs merged)))
-              merged)))))))
+          ;; else, no more implications: done.
+          (do
+            (log/debug (str "sem-impl:" (strip-refs original-input) " -> " (strip-refs merged)))
+            merged))))))
 
 
+
+

   [babel.exception :refer [exception]]
   #?(:cljs [babel.logjs :as log])
   #?(:clj [clojure.tools.logging :as log])
   [dag_unify.core :refer [strip-refs]]))

(def encyc
  {

              :part-of-human-body)
   (get-encyc input :pet)
   (get-encyc input :place)
   (get-encyc input :time)
   ])

(defn sem-impl [input & [original-input]]
  "expand input feature structures with semantic (really cultural) implicatures, e.g., if human, then not buyable or edible"
