updating userAgent parsing logic.