changes coffeescript to JS