improve game flow control