converted other js to coffee