         (err (str "class " (print-var clss) " not found in: " location))
         (lookup-field clss (.-fields (second class)) fident location)
         )
-      ))
+      )
+    type
+    (err (str "expected class type, found " (print-type type) " in: " location))
+    )
   )
 
 (defn- new-scope

               [narg vmap3] (add-arg vmap2 arg)] [(conj tmprgs narg) vmap3]))
    [:succ [[:args] vmap]] (rest args))
  )

(defn- print-type
  [type]
  (match type
    [:void] "void"
    [:int] "int"
    [:string] "string"
    [:bool] "bool"
    [:atype ident] (str (print-type ident) "[]")
    [:tident [:ident a]] a
    [:ident a] a))

(defn- print-args
  [args]

      :etypednull (domonad phase-m
                    [type (m-result (second expr))
                     tmp (if (contains? ["void" "int" "boolean" "string"] (second type))
                           (err (str "expected class type, found " (print-type type) " in: " location))
                           (succ "ok")
                           )
                     tmp2 (if (contains? (.-classes glob-state) type)
