refactor stage one