§ 23-b. Participation in loan or investment. Notwithstanding any other provisions of this article or of any general, special or local law, where a municipality has made or contracted to make a mortgage loan to a company to finance a project: one or more banking organizations as defined in subdivision eleven of section two of the banking law, educational institutions, hospitals, medical research institutes, insurance companies, trustees or fiduciaries, including fiduciaries holding funds for investment, the New York city housing development corporation, other public corporations, or other entities which purchase, invest, or deal in first mortgage loans in the normal course of their business, or any combination of the foregoing, shall have the power to participate in such loan or make or participate in a new loan secured by a bond or note and a single participating mortgage, or by separate bonds or notes and separate mortgages, or to invest, singly or jointly, with the municipality in a bond or note and single participating mortgage or in separate bonds or notes and mortgages or in a new mortgage or mortgages with respect to all or a portion of the loan by a municipality to a company; and the supervising agency shall have the power, upon the mortgagor's consent, to modify the terms and conditions of the original bond or bonds or note or notes and mortgage or mortgages and any other documents executed in connection with such original loan, as the supervising agency may deem necessary or desirable to provide for such participation, new loan or investment as provided in this section, including but not limited to (i) modification of the rate and time of payment of interest on the original loan or rate and time of amortization of principal thereof, (ii) providing for priority for payment of the principal of and interest on that portion of the mortgage indebtedness attributable to such participation, new loan or investment by one or more of such entities or organizations, (iii) subordination of the interest of the municipality to the interest of one or more of such organizations or entities in such participation, new loan or investment, and (iv) otherwise providing that the interest of each upon such participation, new loan or investment need not be of equal priority as to lien, or be equal as to interest rate, time or rate of amortization of principal or time of payment of interest or otherwise; provided, however, that the aggregate amount of the loan or loans to a company does not exceed the amount authorized pursuant to section twenty-three of this article. When consent of a company is required for any participation, new loan or investment pursuant to this section and such participation, new loan or investment will be substantially equivalent to a refinancing of indebtedness pursuant to section twenty-three-a or subdivision twenty-two-a of section six hundred fifty-four of this chapter, then; (i) the provisions of this article, including without limitation the provisions of section twenty-three-a, limiting total indebtedness of a company after a refinancing shall apply to total indebtedness of the company after such participation, new loan or investment; (ii) the provisions of this article applicable to a mortgage of a company insured by the federal government in connection with such refinancing shall apply to a mortgage securing the interest of entities or organizations other than the municipality in such participation, new loan or investment; (iii) the provisions of this article concerning residual indebtedness, such residual indebtedness having been calculated as if the mortgage referred to in clause (ii) of this sentence were a federally insured mortgage, shall apply to an interest of the municipality after such participation, new loan or investment which is secured by a mortgage; (iv) the provisions of this article concerning residual receipts obligations shall apply to an interest of the municipality after such participation, new loan or investment which is unsecured, and (v) the provisions of subdivision four-b of section twenty-three-a of this article concerning the credit referred to therein shall apply in a manner consistent with such subdivision. For purposes of the foregoing sentence of this section, the term surplus cash (referred to in subdivision seven of section twenty-three-a of this article) shall be applied by the supervising agency in a manner consistent with the definition of such term in regulatory agreements with the federal government for the refinancing of indebtedness of municipally-aided projects. The provisions of subdivisions one and five of section twenty-six of this article shall not apply to such participation in a loan or investment pursuant to this section if undertaken in connection with a project theretofore approved pursuant to section twenty-six of this article. Where the municipality shall join with one or more organizations of the kind hereinabove mentioned, in making a loan secured by a single participating mortgage or by separate mortgages, the municipality is authorized, through its supervising agency, to make provision, either in the mortgage or mortgages or by separate agreement, for the performance of such services as are generally performed by a banking institution or insurance company which itself owns and holds a mortgage or by a trustee under a trust mortgage. The supervising agency is hereby authorized to act as trustee or to consent to the appointment of a banking institution to act in such capacity. In connection with any participation in a loan or investment pursuant to this section, the municipality through its supervising agency shall have the power to assign or pledge, in whole or in part, to one or more of the organizations or entities participating in such loan or investment its right, title and interest in and to any mortgage held by it pursuant to this article and any contract or arrangement for the payment of subsidy relating to such mortgage, including the right to receive and apply to repayment of such loan and the interest thereon any receipts to be derived by it from such mortgage or from such contract or arrangement.