show index refactor