Problem 9 finished