tweaked code, clojure stuff