
78 Ill. App.3d 361 (1979)
397 N.E.2d 539
POLE REALTY COMPANY, Plaintiff-Appellee and Cross-Appellant,
v.
WILLIE SORRELLS, a/k/a Willie Edwards, Defendant-Appellant and Cross-Appellee.
No. 78-1627.
Illinois Appellate Court  First District (5th Division).
Opinion filed November 16, 1979.
*362 Alan Freedman, Daniel Rosenblum, Jeffrey L. Taren, and Eric Gershenson, all of Legal Assistance Foundation, of Chicago, for appellant.
Jay Goran, of Chicago, for appellee.
Affirmed in part, and reversed in part and remanded.
Mr. JUSTICE LORENZ delivered the opinion of the court:
Defendant appeals from an order striking her second affirmative defense and counterclaim to a complaint seeking possession of a single-family residence and from the entry of summary judgment in favor of plaintiff on the said complaint. On appeal, she contends that the trial court erred in holding that as a matter of law there is no implied warranty of habitability in the lease of a single-family residence. Plaintiff cross-appeals from an order denying reconsideration of its motion for costs and fees because of defendant's allegedly false and fraudulent pleading. On appeal, plaintiff argues that the trial court erred in failing to hold a hearing on the motion for costs and fees.
The following facts are pertinent to a disposition of this appeal.
On May 17, 1978, plaintiff filed a complaint alleging that defendant was unlawfully withholding the single-family residence located at 5951 S. Justine, Chicago, Illinois, from plaintiff and claiming possession of the said property. On June 2, 1978, defendant filed her answer, first and second affirmative defenses and counterclaim. In her answer defendant denied that she was unlawfully withholding possession of the premises and that plaintiff was entitled to possession thereto. As her first affirmative defense defendant alleged that she was not served with any notice terminating her tenancy for nonpayment of rent or otherwise. As a second affirmative defense defendant alleged that plaintiff was not entitled to possession of the premises because, as a result of plaintiff's breach of an implied warranty of habitability, no rent was due and owing. In support of this affirmative defense, defendant alleged that commencing in January 1976 and continuing to the present time, the premises at 5951 S. Justine "have been at various times to various degrees, in substantial violation of the Municipal Code of the City of Chicago." Specifically, she alleged the following violations: deteriorated roof with holes and rotted boards; loose windows with rotted frames and broken sashes; cracked and broken foundation permitting entry of rats and other rodents; holes, cracks and *363 rotting floor boards in bathroom on second floor; broken, cracked and loose plaster on walls and ceiling of upstairs staircase; broken kitchen sink; nonfunctioning bathroom sink; malfunctioning plumbing system causing "back up"; unsanitary and noxious odors from basement; defective and dangerous drainage pipe; inadequate covering on ventilation pipes; failure to provide screens for doors and windows from April 15 to November 15; failure to exterminate; inadequate heating facilities; and defective eaves. For each of the listed violations defendant cited the section of the municipal code allegedly violated.
Defendant further alleged that as an immediate and proximate result of the claimed code violations the fair market rental value of the premises had been reduced by 50% from January 1976 to the present. Defendant finally alleged that she had "paid plaintiff rent far in excess of the value of the premises and no money is due or owing to plaintiff from defendant for rent or otherwise."
In her counterclaim defendant alleged that as a result of plaintiff's breach of an implied warranty of habitability the value of her tenancy was reduced in the amount of $2,780. As further result of the breach she alleged that she had been forced to pay $80 for extermination services and $1200 in excessive gas bills and that she had been physically and emotionally injured in the amount of $1,000. In the prayer for relief to her counterclaim, defendant sought money damages, costs and attorney's fees and a writ of injunction ordering plaintiff to operate said building in substantial compliance with the Municipal Code of the City of Chicago.
Plaintiff subsequently moved to strike the answer and counterclaim. On July 11, 1979, the trial court granted the motion to strike as to the second affirmative defense and counterclaim because "as a matter of law the implied warranty of habitability does not apply to the leasing of a single family residence." The trial court allowed the answer and first affirmative defense to stand. The trial court denied defendant's motion to reconsider the order striking the counterclaim and second affirmative defense.
The trial court subsequently granted summary judgment in plaintiff's favor on the complaint, but denied plaintiff's motion for fees and costs because of allegedly false and fraudulent pleadings by defendant. Defendant appeals from the order granting summary judgment in favor of plaintiff and from the order striking the second affirmative defense and counterclaim. Plaintiff appeals from the order denying fees and costs.

OPINION
Defendant first contends that the trial court erred in striking her second affirmative defense and counterclaim for the reason that there is no implied warranty of habitability contained in the lease of a single-family *364 residence. She argues that the reasoning of the Supreme Court of Illinois in Jack Spring, Inc. v. Little (1972), 50 Ill.2d 351, 280 N.E.2d 208, is applicable to the lease of a single-family residence as well as to the lease of a multiple-unit dwelling. In Spring the court held:
"[I]ncluded in the contracts, both oral and written, governing the tenancies of the defendants in the multiple unit dwellings occupied by them, is an implied warranty of habitability which is fulfilled by substantial compliance with the pertinent provisions of the Chicago building code. We hold further that the defendants' answers sufficiently plead the existence and breach of the implied warranties. The issues raised were germane to the decisive question of whether the defendants were indebted to plaintiffs for rent and the trial court erred in striking the affirmative defenses alleging breach of the implied warranty." 50 Ill.2d 351, 366, 280 N.E.2d 208, 217.
A careful analysis of the Spring opinion reveals that the court based its decision upon both an analogy to its decision in Schiro v. W.E. Gould & Co. (1960), 18 Ill.2d 538, 165 N.E.2d 286, and upon the reasoning of the United States Court of Appeals for the District of Columbia in Javins v. First National Realty Corp. (D.C. Cir.1970), 428 F.2d 1071. We will, therefore, examine Schiro and Javins to determine whether the reasoning of those decisions is applicable to single-family residences as well as to multiple-unit dwellings.
In Schiro plaintiff entered into a contract for the purchase of certain real property upon which defendants promised to construct a residence. Prior to accepting a deed from defendants, plaintiff discovered that the water and sewerage system did not conform to the city code. Plaintiff thereupon tendered payment of the agreed purchase price and sought a court order compelling defendants to install a water and sewerage system which conformed with the city code. Defendant moved to strike the complaint for failure to state a cause of action, arguing that the contract of purchase did not require that such a system be installed. In reversing the trial court's order of dismissal, the Supreme Court of Illinois stated:
"It is settled law that all contracts for the purchase and sale of realty are presumed to have been executed in the light of existing law, and with reference to the applicable legal principles. (91 C.J.S. 1032.) Thus, the law existing at the time and place of the making of the contract is deemed a part of the contract, as though expressly referred to or incorporated in it.
* * *
Applying this established law to the instant case, it is evident that the contract to purchase the land and building to be constructed by defendants included, as an integral part, the relevant provisions of *365 the city code in existence at the time the contract was executed. The requirements of the code were, therefore, as much a part of the contract as if they had been enumerated by the parties. Illinois Bankers Life Ass'n v. Collins, 341 Ill. 548, 552." 18 Ill.2d 538, 544-45, 165 N.E.2d 286, 290-91.
In Jack Spring, Inc. v. Little (1972), 50 Ill.2d 351, 280 N.E.2d 208, the court reasoned that the Schiro situation was analogous to the case where a tenant alleges that an implied warranty of compliance with the Chicago building code exists in the lease of residential property. Although Spring involved a multiple-unit dwelling, logic compels that the same analogy be valid between the Schiro cases and the situation involving a single-family residence.
The Spring court also found the reasoning of Javins v. First National Realty Corp. (D.C. Cir.1970), 428 F.2d 1071, to be persuasive authority for recognizing an implied warranty of habitability in the lease of residential property and quoted extensively from that opinion. The Javins court discussed three considerations which compelled the recognition of a landlord's warranty of habitability. The first consideration was that the common law assumption that the land was more important than the living quarters and that the tenant was fully capable of making repairs himself is simply no longer true. The court in Javins recognized that the modern tenant, unlike his medieval predecessor, is interested not in a plot of land but a house which is suitable for occupancy. Moreover, the court noted that the modern tenant does not usually have the skills required to maintain a modern dwelling, nor will his tenure in a specific apartment be of sufficient duration to justify his efforts at repairs.
The Javins court secondly drew support from principles found in consumer protection cases, stating:
"The landlord sells housing as a commercial businessman and has a much greater opportunity, incentive and capacity to inspect and maintain the condition of his building. Moreover, the tenant must rely upon the skill and bona fides of his landlord at least as much as a car buyer must rely upon the car manufacturer." 428 F.2d 1071, 1079.
The Javins court stated thirdly that the nature of the modern urban housing market requires application of the implied warranty of habitability. In this regard the court noted the inequality of bargaining power between landlord and tenant, the severe shortage of adequate housing and the fact that poor housing is detrimental to the whole society rather than merely to the tenant himself.
We believe the above three considerations, relied upon by both the Javins and Spring courts, are equally applicable to the lease of a single-family residence. The single-family tenant is concerned with the *366 adequacy of his living quarters and only remotely in the condition of the land upon which those quarters rest. Moreover, he usually lacks the skill and means to himself effectively and economically maintain the single-family residence in a state of good repair. This lack of skill and means is accentuated by the fact that such a tenant's tenure is seldom of sufficient length to justify his efforts at repairs. Principles derived from consumer protection cases are also analogous to the situation involving a single-family residence. The tenant in such a residence must also rely upon the landlord to inspect and maintain the building. Such a tenant has neither the skill nor opportunity to adequately determine the condition of the premises, other than in a superficial manner, prior to entering into a lease agreement. We also agree that the existence and use of poor housing, as measured by building code standards, results in a detriment to our whole society. Moreover, that detriment exists regardless of whether the poor housing be multiple unit or single family.
 1 For the foregoing reasons we hold that the implied warranty of habitability established by the Supreme Court of Illinois in Spring is also included in contracts governing tenancies in single-family residences. We further hold that, as in Spring, this warranty is fulfilled by substantial compliance with the pertinent provisions of the local building code. In the instant case defendant's second affirmative defense sufficiently raised the issue of whether plaintiff breached the implied warranty of habitability. Since that issue was germane to the question of whether defendant was indebted to plaintiff for rent, we hold that the trial court erred in striking the second affirmative defense alleging breach of the implied warranty of habitability.
Plaintiff argues, however, that the court in Spring limited its holding to cases involving multiple-unit dwellings. Although it is clear that defendants in Spring were residents of multiple-unit dwellings and the court addressed itself to the facts of that case, we find no language in the court's opinion which would bar extension of the implied warranty of habitability to cases involving single-family residences. As we have discussed above, logic and policy clearly favor such an extension.
 2 Defendant also contends that the trial court erred in striking her counterclaim for damages resulting from plaintiff's alleged breach of the implied warranty. It is clear that a counterclaim raising the issue of whether excess rent has been paid may be asserted in an action for possession of property based upon nonpayment of rent. (Peoria Housing Authority v. Sanders (1973), 54 Ill.2d 478, 298 N.E.2d 173.) Accordingly, we further hold that the trial court erred in striking defendant's counterclaim.
Defendant further contends that the trial court erred in granting summary judgment in favor of plaintiff on the complaint. It is clear that summary judgment is appropriate where "there is no genuine issue as to *367 any material fact and that the moving party is entitled to a judgment as a matter of law." (Ill. Rev. Stat. 1977, ch. 110, par. 57.) In light of our determination that the trial court erred in striking the second affirmative defense, it is clear that we must reverse the summary judgment. An issue of material fact clearly remains as to whether plaintiff has breached the implied warranty of habitability.
On cross-appeal plaintiff contends that the trial court erred in refusing to allow its motion for costs and fees pursuant to section 41 of the Civil Practice Act (Ill. Rev. Stat. 1977, ch. 110, par. 41). Section 41 provides as follows:
"Allegations and denials, made without reasonable cause and found to be untrue, shall subject the party pleading them to payment of reasonable expenses, actually incurred by the other party by reason of the untrue pleading, together with a reasonable attorney's fee."
 3 The basic thrust of plaintiff's motion was that defendant's allegations of building code violations in her second affirmative defense and counterclaim were untrue and made in bad faith. Plaintiff's motion to strike admitted the well-pleaded facts of the second affirmative defense and counterclaim for purposes of the motion. The trial court granted the motion to strike, holding that the allegations were insufficient as a matter of law. Only a question of law was before the court on the motion to strike. The trial court specifically held that the lease for a single-family residence did not contain an implied warranty of habitability. Therefore, the trial court did not reach the questions of whether the allegations of building code violations were untrue and whether those allegations were made in bad faith.
 4 Section 41 does not apply where a party seeking costs and fees has prevailed on a motion to strike or dismiss since the allegations in such a case have not been found to be untrue. (Fred Nemerovski & Co. v. Barbara (1969), 106 Ill. App.2d 466, 246 N.E.2d 124; Awotin v. Abrams (1941), 309 Ill. App. 421, 33 N.E.2d 179.) Accordingly, we do not believe that the trial court erred here in refusing to grant plaintiff's motion for fees and costs.
For the foregoing reasons the judgment of the circuit court striking defendant's second affirmative defense and counterclaim and granting summary judgment in favor of plaintiff is reversed and the matter is remanded for further proceedings not inconsistent with this opinion. The judgment of the circuit court denying plaintiff's motion for costs and fees is affirmed.
Reversed in part; affirmed in part; remanded with directions.
SULLIVAN, P.J., and MEJDA, J., concur.
