refactor index for mod design