endGame functionality works now