answer for problem 3