refactor step 2