reducing api calls