Updated api to accept string instead of array.