added user agent support, ref #81