created a single game loop