Complete exercise 2.18