added minigame termination condition