added coffeescript solution