chapter 5: some more exercises