translate frontend to coffeescript