All cities of the first and second class in this state are authorized, by ordinance, in consideration of the benefits to be received by the cities by reason of the matters set out in § 14-91-801, to obligate itself to aid or assume the obligations of the improvement districts, or of its board of managers or board of improvement, payable out of the surplus revenues of the city, after the necessary expenses of the city have been paid or provided for. They shall be paid out of such surplus, from year to year, until the obligations assumed shall have been fully paid.