question 9 completed, some methods simplified