refactor step 3