add game end handling