completely implemented everything in coffeescript now