; (2) by inserting after subsection (e) the following: (f) Querying procedures (1) Procedures required (A) In general The Attorney General, in consultation with the Director of National Intelligence, shall adopt querying procedures for queries of data collected pursuant to an authorization under subsection (a). (B) Record of queries The Attorney General, in consultation with the Director of National Intelligence, shall ensure that the procedures adopted under subparagraph (A) include a technical procedure whereby a record is kept of all queries using a known United States person identifier. (2) Judicial review The querying procedures adopted in accordance with paragraph (1) shall be subject to judicial review pursuant to subsection (j). (3) Query defined In this subsection, the term query means any instance in which data the Government has already acquired is searched using a specific term or terms for the purpose of discovering or retrieving unminimized content or metadata. . (b) Conforming amendments (1) Amendments to section 702 of the Foreign Intelligence Surveillance Act of 1978 Such section is further amended— (A) in subsection (a), by striking with subsection (i)(3) and inserting with subsections (j)(3) ; (B) in subsection (c)— (i) in paragraph (1)(B), by striking with subsection (g) and inserting with subsection (h) ; (ii) in paragraph (2), by striking to subsection (i)(3) and inserting to subsection (j)(3) ; and (iii) in paragraph (3)— (I) in subparagraph (A), by striking with subsection (g) and inserting with subsection (h) ; and (II) in subparagraph (B)— (aa) by striking to subsection (i)(1)(C) and inserting to subsection (j)(1)(C) ; and (bb) by striking under subsection (i) and inserting under subsection (j) ; (C) in subsection (d)(2), by striking to subsection (i) and inserting to subsection (j) ; (D) in subsection (e)(2), by striking to subsection (i) and inserting to subsection (j)