
598 P.2d 161 (1979)
Thomas C.S. LAU and Henry Choy Lau, Plaintiffs-Appellees,
v.
Cayetano BAUTISTA, Rufino Tahanlangit, Aquino Arce, Hermogenes L. Rania, Mariano Laureno, Hilario Baisa, Martin Villar, Felix C. Soria, Edwardo Cagatin, Lee Chun, Adolph Von, Juan A. Lamar and Kam Shing Young, Defendants-Appellants.
No. 6298.
Supreme Court of Hawaii.
July 23, 1979.
*163 Wayson W.S. Chow, Honolulu (Leonor Tamoria, Honolulu, with him on briefs), for defendants-appellants.
Thomas M. Rosenberg, Honolulu (Kai, Dodge & Evensen, Honolulu, of counsel) for plaintiffs-appellees.
Before RICHARDSON, C.J., OGATA and MENOR, JJ., and MARUMOTO and KOBAYASHI, JJ., assigned by reason of vacancies.
PER CURIAM.
This is an appeal from an order of the circuit court, granting partial summary judgment to plaintiff-appellees Thomas C.S. Lau and Henry Choy Lau (hereinafter appellees) against defendant-tenant-appellants Cayetano Bautista, Rufino Tahanlangit, Aquino Arce, Hermogenes L. Rania, Mariano Laureno, Hilario Baisa, Martin Villar, Felix C. Soria, Edwardo Cagatin, Lee Chun, Adolph Von, Juan A. Lamar, and Kam Shing Young (hereinafter appellants); from an order denying appellants' motion to dismiss; and from an order granting appellees' motion for issuance of writ of possession. We reverse.
In the court below, appellees brought an action for summary possession and damages against appellants.
Appellants filed an answer and counterclaim. Appellants' answer raised, among others, the following defenses: failure to join the City and County of Honolulu, Department of Housing and Community Development, as an indispensable party; violation of due process in appellees' "attempt to displace [appellants] without first following the procedures contained in Chapter 111, Hawaii Revised Statutes"; the doctrine of retaliatory eviction; appellees' breach of an implied warranty of habitability.
Appellants filed a motion to dismiss pursuant to H.R.C.P., Rule 12(b)(7), contending that the City and County of Honolulu was an indispensable party under H.R.C.P., Rule 19. The trial court denied the motion.
Appellees filed a motion for summary judgment. The trial court, without resolution of appellants' defenses and counterclaim, granted summary judgment as to the issue of possession. However, the court denied summary judgment with respect to all other issues, including appellants' counterclaim.
The trial court issued a writ of possession. However, the writ of possession was stayed pending appeal to this court.

ISSUES
I. Whether appellees complied with the notice requirements of HRS § 521-71(a) (1974 Supp.).
II. Whether appellants may assert breach of an implied warranty of habitability as an affirmative defense in the action for summary possession.
III. Whether adequate relocation assistance was offered to appellants.
IV. Whether the City and County of Honolulu is an indispensable party under H.R.C.P., Rule 19.

OPINION
Under H.R.C.P., Rule 56(c), a summary judgment will be sustained only if the record shows that there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law. Hunt v. Chang, 60 Haw. 608, 618, 594 P.2d 118, 124 (1979); Gealon v. Keala, 60 Haw. 513, 518, 591 P.2d 621, 625 (1979). Inferences to be drawn from the record must be viewed in the light most favorable to the nonmoving party. Hunt v. Chang, supra, 60 Haw. at 618, 594 P.2d at 124; Hokama v. Relinc Corp., 57 Haw. 470, 472, 559 P.2d 279, 281 (1977).
*164 For purposes of ruling on a summary judgment a fact is material if proof of that fact would have the effect of establishing or refuting one of the essential elements of a cause of action or defense asserted by the parties. Hunt v. Chang, supra, 60 Haw. at 618, 594 P.2d at 124. See Richards v. Midkiff, 48 Haw. 32, 39, 396 P.2d 49, 54 (1964).

I. WHETHER APPELLEES COMPLIED WITH THE NOTICE REQUIREMENTS OF HRS § 521-71(a) (1974 Supp.).
HRS § 521-71(a) (1974 Supp.)[1] provides:
When the tenancy is month to month, the landlord or the tenant may terminate the rental agreement upon his notifying the other at least twenty-eight days in advance of the anticipated termination.
Appellants contend that appellees' letter of April 14, 1975, did not constitute sufficient notice.
It is undisputed that appellees sent appellants a letter, dated April 14, 1975, and entitled, "Notice to vacate and demolition of building." The letter stated:
We are in receipt of a letter from the City and County of Honolulu Director and Building Superintendent, notifying us that the premises you now occupy must be demolished. The structures have been found to be substandard and therefore continued occupancy on your part will be at your own risk.
You are hereby advised to move immediately if possible, but not later than thirty (30) days from the date of this letter.
              LAU REALTY COMPANY
We construe the letter to constitute sufficient notice. The sufficiency of a notice must be judged within its four corners. Carteret Properties v. Variety Donuts, Inc., 49 N.J. 116, 125, 228 A.2d 674, 679 (1967).
Appellants contend that certain appellants did not receive timely notice under HRS § 521-71(a) (1974 Supp.).
Under the provisions of HRS § 521-71(a) (1974 Supp.), appellees were required to notify appellants "at least twenty-eight days in advance of the anticipated termination." The "anticipated termination" was May 14, 1975, which was thirty days from the date of the letter. Twenty-eight days in advance of May 14, 1975, was April 16, 1975. Appellees were thus required to notify appellants on or before April 16, 1975.
There is a genuine dispute as to whether appellants Cagatin, Laureno, and Tahanlangit received timely notice. The trial court erred, therefore, in granting summary possession against these appellants.
It is undisputed that appellants Lamar and Villar did not receive timely notice. The complaint filed by the appellees should have been dismissed as to appellants Lamar and Villar.
There is no dispute that appellants Arce, Baisa, Bautista, Lee, Rania, Soria, Von, and Young received timely notice. However, the trial court erred in granting summary judgment for summary possession against these appellants without first resolving the issues concerning the affirmative defense of breach of an implied warranty of habitability and the adequacy of relocation assistance.

II. WHETHER APPELLANTS MAY ASSERT BREACH OF AN IMPLIED WARRANTY OF HABITABILITY AS AN AFFIRMATIVE DEFENSE IN THE ACTION FOR SUMMARY POSSESSION.
Appellants' answer to complaint raised breach of an implied warranty of habitability as a defense.
Appellants contend that

*165 [t]he trial court's granting of possession where the defense of breach of warranty of habitability was raised was improper as a matter of law.
In Lemle v. Breeden, 51 Haw. 426, 433, 462 P.2d 470, 474 (1969), we held that in the lease of a dwelling there is an implied warranty of habitability and fitness for the use intended. Having adopted the view that a lease is essentially a contractual relationship, we stated that upon breach of an implied warranty of habitability, a tenant would be entitled to the basic contract remedies of damages, reformation, and rescission. Id., 51 Haw. at 436, 462 P.2d at 475.
We extended the holding of Lemle v. Breeden, supra, in Lund v. MacArthur, 51 Haw. 473, 462 P.2d 482 (1969). In Lund, we held that an implied warranty of habitability exists in the lease of furnished, as well as unfurnished, dwellings. Id., 51 Haw. at 475, 462 P.2d at 483.
Whether a tenant may assert breach of an implied warranty of habitability as a defense in an action for summary possession is a question of first impression in this jurisdiction.
We hold that where a landlord brings an action for summary possession based on a tenant's failure to pay rent,[2] the tenant may assert the landlord's breach of an implied warranty of habitability as an affirmative defense. Green v. Superior Court of City and County of San Francisco, 10 Cal.3d 616, 637, 111 Cal. Rptr. 704, 718, 517 P.2d 1168, 1182 (1974); LeClair v. Woodward, 6 Conn.Cir. 727, 728, 316 A.2d 791, 792 (1970); Rome v. Walker, 38 Mich. App. 458, 464-65, 196 N.W.2d 850, 853 (1972); Fritz v. Warthen, 298 Minn. 54, 59, 213 N.W.2d 339, 342 (1973); Pugh v. Holmes, 253 Pa.Super. 76, 86, 384 A.2d 1234, 1240 (1978); Foisy v. Wyman, 83 Wash.2d 22, 28, 515 P.2d 160, 166 (1973). The tenant's obligation to pay rent and the landlord's duty to maintain the premises in habitable condition are mutually dependent. Javins v. First National Realty Corp., 138 U.S.App.D.C. 369, 380, 428 F.2d 1071, 1082 (1970); Green v. Superior Court, supra, 10 Cal.3d at 635, 111 Cal. Rptr. at 716, 517 P.2d at 1181; Fritz v. Warthen, supra, 298 Minn. at 58, 213 N.W.2d at 341. As the court in Foisy v. Wyman, supra, stated:
[T]he affirmative defense of breach of implied warranty of habitability goes directly to the issue of rent due and owing, which is one of the basic issues in an unlawful detainer action.
Id., 83 Wash.2d at 31-32, 515 P.2d at 166. See Jack Spring, Inc. v. Little, 50 Ill.2d 351, 359, 280 N.E.2d 208, 217 (1972).
However, the action for summary possession filed herein is not premised merely on the tenants' failure to pay rent due. It is undisputed that on March 11, 1975, the City Building Department sent appellees a notice to correct, citing "substandard conditions" which endanger the life, limb, health, property, safety or welfare of the occupants and directing appellees to demolish the building. Appellees then attempted to terminate the tenancy by sending the appellants a notice to vacate, dated April 14, 1975.[3] Appellants subsequently withheld their rent.
Thus, it is clear that the appellees' primary reason for terminating the tenancy was premised on the City Building Department's *166 order to demolish[4] the building. The record does not show that the appellees, prior to receipt of said order, planned to demolish the dwelling structures.
In our opinion, in the factual context of this case, the appellants may assert appellees' alleged breach of an implied warranty of habitability, as an affirmative defense.
Appellees' responsibility, if any, for the dwelling structures being in "substandard conditions" requiring demolition of the structure must be determined. Further, if it is determined that appellees are responsible for said "substandard conditions", whether such responsibility constitutes a breach of the implied warranty of habitability must also be determined.
We, therefore, conclude that the trial court erred in granting summary judgment to appellees herein.

III. WHETHER ADEQUATE RELOCATION ASSISTANCE WAS OFFERED TO APPELLANTS.
Appellants contend that they are "displaced persons" as defined by HRS § 111-2 (1976), that they were denied their statutory rights to adequate relocation assistance, and that the trial court erred in ordering the eviction of appellants without determining the adequacy of relocation assistance.
Chapter 111 of the Hawaii Revised Statutes (1976), entitled "Assistance to Displaced Persons" (hereinafter Act), provides that a state agency must offer relocation assistance to persons it displaces. See §§ 111-1, 111-3, 111-4, 111-6, and 111-7 (1976). The Act does not expressly state whether adequate relocation assistance must be offered prior to eviction.
HRS § 111-1 (1976) states that the purpose of the Act is
to establish a uniform policy for the fair and equitable treatment of owners, tenants, other persons, and business concerns displaced by the acquisition of real property for public or other purposes in the public interest, by building, zoning, and other similar code enforcement activities, or by a program of voluntary rehabilitation of buildings or other improvements conducted pursuant to governmental supervision.
Committee reports on S.B.No. 1977-70 distinctly express the legislature's intent to establish a policy of equitable and humane treatment of persons displaced by governmental action. These reports state as follows:
The purpose of this bill is to establish a uniform policy for the fair and equitable treatment of persons and organizations displaced by the acquisition of real property by governmental agencies... for public purposes.
1970 Senate Journal, 5th Legis., S.C.Rep. 517, Public Health, Welfare and Housing, at 1218.
The purpose of this bill is to establish a uniform policy whereby government will afford equitable and humane treatment to persons displaced by governmental action.
Progress is necessary and necessarily disruptive of the lives of those who lie in its path. However, our concept of the quality of life should include compassion for those whom government uproots in its attempts to improve the quality of life for the majority.

.....
1970 Senate Journal, 5th Legis., S.C.Rep. 742, Ways and Means, at 1329.
In accordance with the legislative intent to establish a policy of equitable and humane treatment of persons displaced by governmental action, we construe the Act to require that adequate relocation assistance be offered to displaced persons prior to eviction.
HRS § 111-2 (1976) defines "displaced persons" as follows:

*167 "Displaced person" means any person who is required to move from any real property on or after June 25, 1970, as a result of the acquisition or imminence of acquisition of such real property, in whole or in part, by a state agency or who moves from such real property as a result of the acquisition or imminence of acquisition by such state agency of other real property on which such person is conducting a business or farm operation. "Displaced person" also includes the foregoing movements from real property by any person as a result of a governmental program of voluntary rehabilitation or building, zoning, and other similar code enforcement activities. "Displaced person" as defined in this chapter shall not include a tenant upon or occupier of state land under a revocable permit which is issued or renewed on or after [June 7, 1974], provided that those persons who are issued revocable permits on State land which they had previously occupied as tenants or occupiers of private land which is subsequently acquired by the State, by virtue of which acquisition the revocable permits are issued immediately upon acquisition, shall be entitled to assistance as displaced persons upon displacement at the termination of the revocable permits. (Emphasis added.)
The appellants are all "displaced persons" as defined in HRS § 111-2 (1976). Appellants are all "persons" as defined in HRS § 111-2 (1976).[5] Further, the City Building Department and the City Department of Housing and Community Development (DHCD) are "state agencies" as defined in HRS § 111-2 (1976). Finally, the City Building Department sent appellees a notice to correct, citing "substandard conditions" and directing appellees to demolish the buildings at 41-45 North Pauahi Street. In response, appellees sent the appellants notices to vacate. The City Building Department's action constitutes "a governmental program of ... code enforcement activities." The appellants are thus "person[s] required to move from any real property on or after July 25, 1970 ... as a result of a governmental program of ... code enforcement activities."
As "displaced persons", appellants were entitled to be offered adequate relocation assistance prior to eviction. Based on the record, we conclude that the trial court erred in granting the judgment herein without first resolving the issue of adequate relocation assistance.

IV. WHETHER THE CITY AND COUNTY OF HONOLULU SHOULD HAVE BEEN JOINED AS A PARTY PURSUANT TO H.R.C.P., RULE 19.
Appellants contend that the trial court erred in denying appellants' motion to dismiss because the City and County of Honolulu (hereinafter City and County) is an indispensable party under H.R.C.P., Rule 19.
H.R.C.P., Rule 19(a), provides as follows regarding "[p]ersons to be joined if feasible":
A person who is subject to service of process shall be joined as a party in the action if (1) in his absence complete relief cannot be accorded among those already parties, or (2) he claims an interest relating to the subject of the action and is so situated that the disposition of the action in his absence may (A) as a practical matter impair or impede his ability to *168 protect that interest or (B) leave any of the persons already parties subject to a substantial risk of incurring double, multiple, or otherwise inconsistent obligations by reason of his claimed interest... .
Under Rule 19(a), if such a person has not been joined, "the court shall order that he be made a party." Where joinder is feasible, the court need not proceed under Rule 19(b) to determine whether to proceed or dismiss for lack of an indispensable party. English v. Seaboard Coast Line Railroad Co., 465 F.2d 43, 48 (5th Cir.1972); 7 Wright & Miller, Federal Practice and Procedure § 1604 at 35 (1972).
Applying the criteria of subsection (a), we find that complete relief cannot be accorded to the appellants in the absence of the City and County, since appellants are entitled to be offered relocation assistance from the City and County. Subsection (a)(1). Further, disposition of the action without giving the City and County an opportunity to address the issue of the adequacy of relocation assistance may "as a practical matter impair or impede" the ability of the City and County to protect its interest in the matter. Subsection (a)(2)(A).
We conclude that the City and County should have been joined as a party in the action unless it was not feasible to so join the City and County. As the record does not indicate whether or not it was feasible to join the City and County as a party herein, the trial court did not err in denying appellants' motion to dismiss. At subsequent proceedings the trial court should cause the parties to show whether it is feasible to have the City and County joined herein. If such showing is made, joinder of the City and County is required under H.R.C.P., Rule 19.
This case is remanded to the trial court for further proceedings in accordance with this opinion.
NOTES
[1]  HRS § 521-71(a) (1974 Supp.) was amended by Act 104, S.L.H. 1975, to read as follows:

When the tenancy is month to month, the landlord or the tenant may terminate the rental agreement upon his notifying the other at least twenty-eight days in advance of the anticipated termination or in cases of voluntary demolition of the dwelling units, ninety days in advance of the anticipated demolition. ... (Emphasis added.)
This amendment, which became effective on May 17, 1975, did not apply to appellees' notice of April 14, 1975.
[2]  HRS § 521-68(a) (1976) provides:

A landlord or his agent may, any time after rent is due, demand payment thereof and notify the tenant in writing that unless payment is made within a time mentioned in the notice, not less than five business days after receipt thereof, the rental agreement will be terminated. If the tenant remains in default, the landlord may thereafter bring a summary proceeding for possession of the dwelling unit or any other proper proceeding, action, or suit for possession.
An action for summary possession may also be based, inter alia, on a tenant's failure to maintain the premises, HRS § 521-69 (1976), and a tenant's continuing in possession of the premises after the landlord has terminated the tenancy. HRS § 521-71(c) (1976).
[3]  As discussed above, some of the appellants did not receive timely notice pursuant to HRS § 521-71(a) (1974 Supp.).
[4]  HRS § 521-74(b)(3) (1976) provides:

(b) Notwithstanding subsection (a), the landlord may recover possession of the dwelling unit if:
* * * * * *
(3) The landlord seeks in good faith to recover possession of the dwelling unit for the purpose of substantially altering, remodeling, or demolishing the premises.
[5]  HRS § 111-2 (1976) also provides the following definitions:

As used in this chapter, the term:
"Person" means (1) any individual, partnership, or corporation or association which is the owner of a business; (2) any owner, part-owner, tenant, or sharecropper operating a farm; (3) the head of a family; (4) an individual not a member of a family; (5) a nonprofit organization exempted from taxation under section 235-9.
"Family" means two or more individuals living together in the same dwelling unit who are related to each other by blood, marriage, adoption, or legal guardianship.
"State agency" means an agency or instrumentality created by the State and includes, for purposes of this chapter, county governmental agencies.
.....
