adding a game loop