changes in problem 3