refactor User model.