Modify coffeescript snippet