gameLoop improvement