refactored code and created version independent get_user_model