changed user agent detection