Complete exercises in chapter 6