task 01 -refactored