added solutions for problem 2