Complete exercise 3.51