all stages are now working ... endgame function required