set up game loop