some refactoring of steps