finished several problems in chapter 8
first attempt at prob 9