adding exercises from chapter 6 and 7