refactor account model