unfinished code for ending the game