moved relevant parts to cljx