refactoring to create generic steps