Completed problem 4