global endgames
finalized
make Endgmae global out of thread
rename global EndGames