Solved exercises for chapter 7