(m) To participate in the development of low and moderate income housing undertaken or assisted pursuant to federal legislation and to finance mortgage loans for the construction or rehabilitation of low and moderate income housing, which may include ancillary commercial facilities to the extent permitted by the then applicable regulations of the department, and to purchase, or participate in the purchase of, securities which are secured by such mortgage loans. A local housing authority may create, designate or approve agencies or instrumentalities to provide such housing and do all other things necessary or desirable to secure financial or other forms of assistance from the federal government including the exemption from federal income taxation of interest on bonds or notes of such housing authority issued with respect to such housing. Low and moderate income housing shall be financed under this paragraph only after the housing authority shall, pursuant to regulations adopted by the department, have found (A) that persons and families whose annual incomes are less than eighty per cent of the median income in the area in which such housing is to be constructed or rehabilitated, as determined by the department, can afford the rentals, including the provision of heat, electricity and hot water, set for twenty per cent of the units in the project on the basis of the use of not more than thirty per cent of their annual income or such greater portion of their annual income as may be required by laws or regulations applicable to any housing subsidy program of any agency of the United States government or the commonwealth to be used in connection with the proposed project or any laws or regulations applicable to the exemption of the interest on the bonds or notes of the