completed problem 4