refactored with provider_token model.