Adding a game loop