edit account and refactoring for model