replacing index structure