Translate existing js to coffee script