Problem 9 and 10 done