refactor index more