switch to requests library for handling http requests; also add counter for requests that have timed out