added allowRedirects option