Converted js to coffee