HW 6 - task1. Tests and comments added. Completed.