completed the exercises for chapters 5-9