added option to curl to follow redirects