Problem 9 done