conversion to coffeescript