The trial court ruled the question of appellants’ right to maintain their defense of breach of an implied warranty of habitability upon the case of King v. Moorehead, 495 S.W.2d 65 (Mo.App.1973), where at page 77[15, 16], the court said, “Breach of this duty [of implied warranty of habitability] justifies retention of possession by the tenant and withholding of rent until habitability has been restored. A tenant who retains possession, however, shall be required to deposit the rent as it becomes due, in custodia legis pending the litigation. (Citing cases.) This procedure assures the landlord that those rents adjudicated for distribution to him will be available to correct the defects in habitability, and will also encourage the landlord to minimize the tenant’s damages by making tenantable repairs at the earliest time. Also, for good cause and in a manner consistent with the ultimate right between the parties, a trial court will have discretion to make partial distribution to the landlord before final adjudication when to deny it would result in irreparable loss to him.” Appellants’ trial counsel, Mr. Kit Carson Roque, acknowledged to the trial court, “There is no question that the rent has not been — was not deposited in custodial (sic) legis.” Upon this record, the trial court entered a judgment for $4,550 rent, $2,645 late charges and $2,475 attorney fees, possession and court costs, there being no objection to the evidence of rent due, late charges and attorney fees (as provided for in the lease).