adding user agent string detection