Completed problem 4.