messy but more functional p7 clojure solution
refacor
refactor