edited javascript with coffeescript