GameEnded functionality added