refactor party variable to newParty