added timeout to api calls