refactoring accounts index