first step convertion to coffeescript