start rewrite on coffee script