refactored steps