Please, check comments inline

Hi Dmytri,
I've found some issues with your code.
You could fix them, if you want to learn as much as possible from this task.