migrate to coffescript