add some code for game result