Complete exercises for chapter 5