refactoring, step 4