refactor as coffee script class