the solution of the problem 8
the solution of the problem 9
refactoring