manage: rewrite js code in cljs