refactor user model