refactored moving pizza logic