update and refactor account model