Completed problem 8.