refactoring step 5