refactoring pizza upgrade