basic clojure implementation