task4. small refactoring