; (2) in subclause (I), by inserting the noncitizen committed only one crime, before the crime was committed when ; and (3) by amending subclause (II) to read as follows: (II) the noncitizen committed not more than 2 crimes, the maximum penalty possible for each crime of which the noncitizen was convicted (or which the noncitizen admits having committed or of which the acts that the noncitizen admits having committed constituted the essential elements) did not exceed imprisonment for 1 year and, if the noncitizen was convicted of either crime, the noncitizen was not sentenced to terms of imprisonment with respective sentences imposed in excess of 180 days (regardless of the extent to which either sentence was ultimately executed). . 1204. Restoring fairness to adjudications (a) Waiver of grounds of inadmissibility Section 212 of the Immigration and Nationality Act ( 8 U.S.C. 1182 ) is amended by inserting after subsection (b) the following: (c) Humanitarian, family unity, and public interest waiver (1) In general Notwithstanding any other provision of law, except section 245G(c)(1)(B), the Secretary of Homeland Security or the Attorney General may waive the operation of any 1 or more grounds of inadmissibility under this section (excluding inadmissibility under subsection (a)(3)) for any purpose, including eligibility for relief from removal— (A) for humanitarian purposes; (B) to ensure family unity; or (C) if a waiver is otherwise in the public interest. (2) Considerations In making a determination under paragraph (1), the Secretary of Homeland Security or the Attorney General shall consider all mitigating and aggravating factors, including— (A) the severity of the underlying circumstances, conduct, or violation; (B) the duration of the noncitizen’s residence in the United States; (C) evidence of rehabilitation, if applicable