added new api arg -provider and logic