Convert js to coffeescript