change condition to end game