           (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)

(def time-start (persistence/current-time-to-string))
(defn get-supertypes [atype]
  "gets types: self, type, immidiate parents"               ; FIXME Yumzia:0 get all parents
  (let [rels (:Relations atype)]
    (conj (for [supertype rels :when (:super (:Data supertype))]
            {:Name (:super (:Data supertype)) :Predicate (:Predicate supertype)})
          {:Name "type" :Predicate (->Iyye_ModalPredicate :IYE :AXIOM time-start :ALWAYS)}
          {:Name (:Name (:atom atype)) :Predicate (->Iyye_ModalPredicate :IYE :AXIOM time-start :ALWAYS)})))

(defn create-iyye-instance [values])


          (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)]
        (if (empty? matching-actions)
          (future (Thread/sleep 800) (ioframes/process-output IO (pr-str "Cant find " cmd " " params)))
          (let [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))
