User userAgent instead of inline function