refactored a step