convert javascript to coffeescript