Adding work done on chapter 10 exercises for homework 6