Changed to use clojure's replace function