refactoring step 1