swith from js to coffee-script