cleanup and end game