transforming the javascript backend to coffeescript