made UA and referer header testing into one request