accounts refactoring