fixed recursion
task 3.4 complite
fixed bug