; and (3) in section 8(f)(5) ( 42 U.S.C. 1437f(f)(5) )— (A) by striking activity’ means and inserting “activity’— (A) means ; (B) by striking the period at the end and inserting ; and ; and (C) by adding at the end the following: (B) does not include any such manufacture, sale, distribution, use, or possession of marijuana, as defined in that section, that is in compliance with the law of the State in which such manufacture, sale, distribution, use, or possession takes place. . 3. Amendments to Quality Housing and Work Responsibility Act of 1998 Subtitle F of title V of the Quality Housing and Work Responsibility Act of 1998 is amended— (1) in section 576 ( 42 U.S.C. 13661 )— (A) in subsection (b)— (i) in paragraph (1), by striking Notwithstanding and inserting Except as provided in paragraph (3) and notwithstanding ; (ii) in paragraph (2), by inserting other than the use of marijuana described in paragraph (3), after controlled substance each place such term appears; and (iii) by adding at the end the following new paragraph: (3) State law exception A public housing agency or an owner of federally assisted housing may not establish standards prohibiting admission to the program or admission to federally assisted housing for any household with a member who engages in the use, distribution, possession, sale, or manufacture of marijuana, as defined in section 102 of the Controlled Substances Act ( 21 U.S.C. 802 ), that is in compliance with the law of the State in which such use, distribution, possession, sale, or manufacture takes place. ; and (B) in subsection (c), by adding after and below paragraph (2) the following flush matter: For the purposes of this subsection, the term criminal activity does not include the use, distribution, possession, sale, or manufacture of marijuana, as defined in section 102 of the Controlled Substances Act ( 21 U.S.C. 802 ), that is in compliance with the law of the State in which such use, distribution, possession, sale, or manufacture takes place.