problem 3 solution