added the coffeescript version
just ran js2coffee on it....