modified src to use coffeescript instead