Final exercises for chapter 7