refactor insipration API call