Converted it to coffescript