solve problem 9
solve problem 10