rewrite in CoffeeScript. Don't fire me