; (II) may compare the mortgagee with such other mortgagees based on underwriting quality, geographic area served, or any commonly used factors the Secretary determines necessary for comparing mortgage default risk, provided that the comparison is of factors that the Secretary would expect to affect the default risk of mortgage loans guaranteed by the Secretary; (iii) shall implement such comparisons by regulation, notice, or mortgagee letter; and (I) may terminate the approval of a mortgagee to originate, underwrite, or service loan guarantees for housing under this section if the Secretary determines that the mortgage loans originated, underwritten, or serviced by the mortgagee present an unacceptable risk to the Indian Housing Loan Guarantee Fund established under subsection (i)— (aa) based on a comparison of any of the factors set forth in this subparagraph; or (bb) by a determination that the mortgagee engaged in fraud or misrepresentation. ; and (C) in paragraph (5)(A), by inserting before the semicolon at the end the following: except, as determined by the Secretary, when there is a loan modification under subsection (h)(1)(B), the term of the loan shall not exceed 40 years . (b) Loan guarantees for Indian housing Section 184(i)(5) of the Housing and Community Development Act of 1992 (12 U.S.C. 1715z–13a(i)(5)) is amended— (1) in subparagraph (B), by inserting after the first sentence the following: There are authorized to be appropriated for those costs such sums as may be necessary for each of fiscal years 2024 through 2034.