Finish exercise 8.5