refactor user