created basic game loop