Added user agent code