converted to coffeescript, compiles and runs now