Refactoring do upgrade step