added named functions to coffeescript