exercise 2.12 and exercise 2.13