refactored pizza hash