converting to coffeescript