in such building is not permitted by a Federal agency holding or insuring the mortgage secured by such building, and (ii) the proceeds from the financing (if any) are applied to acquire or improve such building. (C) Portion of building attributable to financing The requirements of this subparagraph are met with respect to any financing for any taxable year in the credit period if, as of the close of such taxable year, not more than 60 percent of the eligible basis of the qualified middle-income building is attributable to such financing (reduced by the principal and interest of any governmental financing which is part of a wrap-around mortgage involving such financing). (D) Repayment of principal and interest The requirements of this subparagraph are met with respect to any financing if such financing is fully repaid on or before the earliest of— (i) the date on which such financing matures, (ii) the 90th day after the close of the credit period with respect to the qualified middle-income building, or (iii) the date of its refinancing or the sale of the building to which such financing relates. In the case of a qualified nonprofit organization which is not described in section 49(a)(1)(D)(iv)(II) with respect to a building, clause (ii) of this subparagraph shall be applied as if the date described therein were the 90th day after the earlier of the date the building ceases to be a qualified middle-income building or the date which is 15 years after the close of a credit period with respect thereto. (3) Present value of financing If the rate of interest on any financing described in paragraph (2)(A) is less than the rate which is 1 percentage point below the applicable Federal rate as of the time such financing is incurred, then the qualified basis (to which such financing relates) of the qualified middle-income building shall be the present value of the amount of such financing, using as the discount rate such applicable Federal rate. For purposes of the preceding sentence, the rate of interest on any financing