handling url with user agent