refactor towards idiomatic clojure
working CA