rewriting to coffee-script