some work done to game loop