restoring indexG