move factorize function to util.clj.
solution of #12.