read index refactoring