refactor for User model