added ability to follow redirects