add license
solve problem 6
solve problem 7
solve problem 8
solve problem 9
solve problem 10