fix errors in task 2

fix errors in task 2 from Rusovich Yuriy