replace js to coffee-script