Fixed bug in question 8, 9 DONE