convert index.js to coffee