coffescript converted to javascript