refactoring indices view