refactored user model