next step refactor