replace coffeescript with js