added custom user agent support