new implementation in clojure