changed clojure to function