Refactor step 3