adding problem 2 solutions