solutions/max_kaskevich/5: small refactoring.