coffee script implementation and example