updated to use userAgent