Completed problem 3.