refining api calls