rewrite with clojure