Added solutions for problem 2