Converted to CoffeeScript