added soln for Problem 2