index view refactor