Added problem 2
Added alternative implementation of problem 2