converts to coffeescript; adds problem2 solution