solutions/max_kaskevich/tasks: small code refactoring.