           (save-iyye-type-to-db type)))))
 
 (defn check-params [action params]
-  (let [act-params (:Types action)
-        params-types (map #(get-supertypes %) params)
+  (let [act-params (:Types action)]
+    (when (= (count params) (count act-params))
+      (let [params-types (map #(get-supertypes %) params)
         ;   vec-params (vec (map #(:Name (:atom %)) params))
-        pairs (map vector act-params params-types)
-        ok (every? true? (for [cur pairs]
-                  (if (= :UNKNOWN (first cur))
-                    (empty? (second cur))
-                    (some true? (map #(= (first cur) %) (map :Name (second cur)))))))]
-    ;   (future (Thread/sleep 1000) (ioframes/process-output IO (str "okok " ok)))
-    ok)
-    ;(compare act-params vec-params)
-    )  ; FIXME Yumzya context aware compare
+            pairs (map vector act-params params-types)
+            ok (every? true? (for [cur pairs]
+                               (if (= :UNKNOWN (first cur))
+                                 (empty? (second cur))
+                                 (some true?
+                                       (map #(= (first cur) %) (map :Name (second cur)))))))]
+    ok))))  ; FIXME Yumzya context aware compare
 
 (defn apply-relation [relation params]
   (when (check-params relation params)

          (if result
            (future (Thread/sleep 1000) (ioframes/process-output IO (pr-str result)))))
      (let [matching-actions
            (for [action actions-list :when (check-params action params-list)] action)
            nothing (count matching-actions)
            result (func (first matching-actions) params-list)]
        (if result
          (future (Thread/sleep 1000) (ioframes/process-output IO (pr-str result)))
          (future (Thread/sleep 1000) (ioframes/process-output IO (str "False"))))))))

(defn action [cmd params IO]
  (if (= \? (last cmd))

;(persistence/write-noun-to-db (into {} type))

(defn get-iyye-atoms [name builtins]
  "returns a list of found atoms with supplied name"
  (let [builtin-types
        (for [word (vals @builtins) :when (= (:Name (:atom word)) name)] word)]
    (if (empty? builtin-types) (list :UNKNOWN) builtin-types)))

(defn get-iyye-types [name]
  (get-iyye-atoms name noun-words))
