add timeout on API call