converting page.js to coffee