break out misc function into misc.coffee