working version of multiple api calls