finished the exercise and chapter 6