file to handle api calls