refactored to make use of protocol in clojure ttt library, refactoring