HW 4 - task 2. Tests were added.