refactored some steps that were defined improperly