Problem 8 done. 9 is written, but still needs to be tested.