refactor and next step