played with the code, familiarized more with coffeescript