
284 P.2d 374 (1955)
Lester GOLDRING and Elsie Goldring, Appellants,
v.
Pauline KLINE, Respondent.
Pauline KLINE, Appellant,
v.
Lester GOLDRING and Elsie Goldring, Respondents.
Nos. 3831, 3877
Supreme Court of Nevada
May 27, 1955.
*375 George E. Marshall, Las Vegas, for Pauline Kline.
Ralli, Rudiak & Horsey, Las Vegas, Morris Pepper, Houston, Tex., Leslie B. Gray, Reno, for Lester Goldring and Elsic Goldring. and Elsie Goldring.
MERRILL, Chief Justice.
These are cross appeals from judgment. The action was brought by lessees to secure a declaration of rights under the terms of a lease and to compel repair of the leased premises by the lessor. The lessor counterclaimed for rental alleged as due. Following trial, judgment of the court, sitting without a jury, was in favor of the lessor upon the complaint of the lessees, and in favor of the lessees upon the counterclaim of the lessor. Appeals have been taken from the judgment in both respects.

Case No. 3831
This is the appeal taken by the lessees from judgment denying the relief sought by their complaint: a declaration of the lessor's obligation to repair the leased premises. The question involved is whether, notwithstanding a demolition order by the city of Las Vegas, since the building involved can be made safe by repair, it is the lessor's duty to repair and continue the lease in effect.
The premises involved consist of a store building located in the city of Las Vegas. The lease is for a term of six years from January 1, 1953. Under the terms of the lease the lessees were to do certain remodeling of the premises, adapting them to use as a restaurant. In checking this proposed work with the city, they were advised that the premises were in no condition to permit such remodeling until certain structural defects were remedied. Representatives of both the lessor and the lessees thereafter were in touch with the city authorities with respect to the condition of the premises. Several independent inspections were made. Eventually the city building inspector wrote the attorneys for the lessor with respect both to the premises with which we are here concerned and with respect to adjoining property also owned by the lessor. The letter stated that the building "was in bad shape and in bad state of repair." It further stated "It would be impractical to attempt to remodel or repair these buildings so they would comply with the codes and ordinances of the city of Las Vegas. This department in cooperation with the Bureau of Fire Prevention hereby declares these buildings unsafe. They constitute a fire hazard and a hazard to public health and welfare. They are hereby condemned. Demolition or removal of the structures must begin within 30 days * * * from receipt of this notice." The lessor was preparing to comply with this notice when the present suit was commenced and demolition was temporarily enjoined.
Under the terms of the lease no obligation to repair is imposed upon the lessor save that which may result from the usual covenant of quiet enjoyment. In the trial below, lessees presented evidence to the effect that the premises can be restored or "repaired" by replacing the side and rear walls and roof. They contend that since demolition is not essential the lessor under her covenant of quiet enjoyment is obligated to repair.
Under these circumstances it was the holding of this court in Ripps v. Kline, 70 Nev. 510, 275 P.2d 381, that the covenant of quiet enjoyment placed no obligation of repair upon the lessor. That case is closely connected with the one at bar. It concerns the same lessor and adjoining premises. *376 The lessees contend that the case at bar is distinguishable from the Ripps case.
We there stated [70 Nev. 510, 514, 275 P.2d 381, 382, 383]: "Unless the demolition order results from some breach of duty owed by the lessor, the lessees may not hold her responsible for it and the demolition so ordered may not be attributed to her as her act in violation of her covenant of quiet enjoyment." We further stated, "The authorities cited by lessees involve cases in which the demolition resulted from a breach of duty owed by the lessor; where improper actions or omissions of duty of the lessor had necessitated the demolition. They include cases where the lessor had neglected a duty of repair imposed by the lease or where the demolition had been necessitated by the affirmative acts of the lessor or where the lessor had refused compliance with a public safety order or otherwise had failed to meet an obligation imposed by law." Two points of distinction are urged by the lessees.
First, it is contended that while in the Ripps case the pleadings did not disclose the fact (judgment there being rendered upon the pleadings), in the case at bar the record demonstrates that an obligation of repair is imposed by law upon the lessor. In 1953 the uniform building code was enacted as an ordinance of the city of Las Vegas. Section 104(i) of that code provides as follows: "All buildings or structures both existing and new, and all parts thereof, shall be maintained in a safe and sanitary condition * * *. The owner or his designated agent shall be responsible for the maintenance of buildings and structures." Lessees contend that demolition thus was necessitated by the lessor's failure to maintain the premises in a safe condition; that the demolition may therefore be attributed to her as her act in violation of her covenant of quiet enjoyment.
We turn, then, to a consideration of the nature and extent of the duty imposed upon the lessor by section 104(i) of the building code: her duty to maintain her property in a safe condition. Imposed as that duty is by the code, we must look to the code itself for definition of terms. Such significant words as "safe" and "maintain" are not expressly defined. The intent which governs their meaning must, then, be determined by examining other code provisions.
The express purpose of the code is to promote public safety and welfare through regulation relating primarily to new construction: "regulating and controlling the design, construction, quality of materials, use and occupancy, location and maintenance" of buildings and structures. Sec. 102. As to existing buildings, their use or occupancy may continue if not "dangerous to life." Sec. 104(g).
As to existing buildings continuing in legal use and occupancy, the code appears to provide the city with no machinery or authority to require an owner to act to prevent premises from becoming unsafe. As to unsafe buildings the procedure provided under sec. 203 is inspection, determination, and action to remedy by abatement. That section reads as follows:
(a) "All buildings or structures which are structurally unsafe or not provided with adequate egress, or which constitute a fire hazard, or are otherwise dangerous to human life, or which in relation to existing use constitute a hazard to safety or health, or public welfare, by reason of inadequate maintenance, dilapidation, obsolescence, or abandonment, as specified in this Code or any other effective ordinance, are, for the purpose of this Section, unsafe buildings. All such unsafe buildings are hereby declared to be public nuisances and shall be abated by repair, rehabilitation, demolition, or removal in accordance with the procedure of this Section."
(b) "The Building Official shall examine or cause to be examined every building or structure or portion thereof reported as dangerous or damaged and, if such is found to be an unsafe building as defined in this Section, the Building Official shall give to the owner of such building or structure written notice stating the defects thereof. This notice may require the owner or person in charge of the building or premises, within 48 hours, to commence either the required repairs or improvements *377 or demolition and removal of the building or structure or portions thereof, * * *."
Such general terms used in sec. 203(a) as "structurally unsafe," "dangerous to human life," and "hazard to safety, health, or public welfare" are themselves not expressly defined. Obviously the determination that such general conditions exist in a specific instance demands an exercise of judgment on the part of the building official. It would appear, therefore, that the word "safe" as used in sec. 104(i) with reference to existing buildings is to be interpreted as "safe within the determination of the building official"; that the word "maintain" is to be interpreted as "maintain in such manner as the building official shall direct."
In the light of such interpretation the owner's obligation of "maintenance" as to existing buildings is not an obligation to act upon his own initiative to prevent the premises from becoming unsafe. Rather it is one to comply with such specific demands as the city, in the interests of public safety, may make. Until such demand is made, the owner's duty under the section remains latent and wholly undefined. When demand is made, the duty then becomes specific and enforceable by the city. (It may be noted at this point that the obligation with which we are here concerned is distinct from an owner's common law liability for tort resulting from the condition of his premises.)
Our construction is, we feel, fortified by the provisions of the code relative to penalties. Section 205 makes it a misdemeanor to maintain a building contrary to code provisions. If sec. 104(i) is to be construed as requiring the owner to act upon his own initiative to prevent his building from becoming unsafe, it would appear that without notice or direction of any kind from the city and with no contractual obligation of repair, an owner might become criminally liable by innocently permitting a building to reach a state of disrepair which, by some subsequent official determination, constitutes it unsafe. Section 203(d) indicates that such is not the intent of the code. Criminal liability is to attach upon failure to comply with the city's demands. That subsection reads in part as follows: "In case the owner shall fail, neglect, or refuse to comply with the notice to repair, rehabilitate, or to demolish and remove said building or structure or portion thereof, the City Council may order the owner of the building prosecuted as a violator of the provisions of this Code * * *."
The safety order, then, may not be regarded as the consequence of a breach of duty owed to the city, but rather as fixing the extent of the duty so owed. Under sec. 203 that duty may be fixed as demolition. Such was clearly the case here as in the Ripps case. The nature of the duty owed by the owner under sec. 104(i) was by the safety order determined to be demolition.
Lessees rely heavily upon Lindwall against May, 111 App.Div. 457, 97 N.Y.S. 821, cited by this court in the Ripps case. In that case the lessor was held liable to the lessee for an eviction in violation of a covenant of quiet enjoyment. The eviction (as here) resulted from demolition ordered by the city. The demolition (as lessees contend was the case here) was attributed to the lessor's violation of a duty imposed by ordinance. In that case, however, the duty so imposed was fixed and definite. It did not require any official determination of existence or degree. Under certain clearly specified circumstances the owner's clearly specified duty attached. The code there provided that where an excavation is made not to exceed ten feet in depth, the owner of an adjoining wall should preserve the same by proper support and foundation. Such a case, in our view, is clearly distinguishable.
Lessees contend that under sec. 203 the safety order in this case must be construed as an alternative order to repair or demolish (with the consequences noted in the Ripps opinion); that the language of the ordinance must control over the language of the notice. As in the Ripps case we construe this language (that the owner may be required within 48 hours to commence "either the required repairs or improvements or demolition and removal of the building") as providing that the owner may be required, within the time specified, *378 to do what has been determined to be necessary, whether that action be for repair, improvement, or demolition and removal.
Lessees seem to complain that this places too much discretionary power in a municipal official to determine important questions of property rights. Lessees' difficulty is in confusing lessor's duty to the city with her duty to the lessees. Section 104(i) is concerned only with the former. Under its provisions the city is only concerned with the necessities of public safety; with determining what is the least that it can in the interests of public safety reasonably require of the owner. Should such requirements be less than demolition, should the owner disregard them and, as in the Lindwall case, should demolition become necessary as a result, the lessor's covenant of quiet enjoyment might be said to have been violated. Demolition could be attributed to the owner as his voluntary act.
Lessees contend that, considering the repairability of the building, the city should not have ordered demolition. If the city's safety order was for any reason improper, it can hardly be challenged in an action to which the city is not a party. In this matter we must accept the demolition order as it appears upon its face: a considered and proper determination that in the interests of public safety and in the light of the condition of the premises, the least the city could demand of the owner was demolition.
Lessees' second point of distinction from the Ripps case is that the record before us demonstrates that the lessor invited the demolition order; she conferred with the municipal authorities regarding it; she made a special trip to Las Vegas in order that it might be served upon her. Lessees contend that the demolition was thus occasioned by affirmative acts of the lessor and may be attributed to her as her voluntary act.
The lessor may well have cooperated with the municipal authorities. She may even have sought to persuade them that under the circumstances demolition was the reasonable solution. There is nothing in the record, however, to indicate that she imposed her will upon them improperly or that they improperly deferred to her judgment. The order, then, remains the official action of the city. Nitro Powder Company v. Agency of Canadian Car & Foundry Company, 233 N.Y. 294, 135 N.E. 507.
This, of course, is not to say that rights other than those of the owner may be disregarded by municipal authorities; that their safety orders may ignore reason and practical necessity so long as the owner consents; or that their orders may be based not upon their judgment as to what is necessary to public safety but upon private agreement with interested parties; all in disregard of the rights of others. As we have already noted, however, if the city's action for any reason was improper it may not be challenged in this case.
We conclude that the case at bar is not distinguishable from the case of Ripps v. Kline, supra; that, as there held, the lessor's covenant of quiet enjoyment placed upon her no obligation to restore or repair the premises.
Two other questions are presented by lessees upon which we are asked to declare the rights of the parties:
1. Accepting that the lessor is not obligated to repair, have not the lessees a right to repair at their own expense and thus avoid the consequences of demolition?
2. Accepting that the lessor is not obligated to repair, have not the lessees a right to retain their leasehold interest, submit to demolition and thereafter make such use of the land as their rights might then permit?
Respondent lessor challenges the propriety of our undertaking to declare the rights of the parties upon these questions. In our view her position is well taken. These questions are being presented for the first time on this appeal.
The record makes it clear that never, prior to suit, had the lessees asserted the rights they now assert in this connection. In their negotiations with the lessor their contention consistently was that the lessor was obligated to restore the premises or, in the alternative, permit the lessees to do so at the expense of the lessor. Upon the questions thus far discussed this was the *379 sole controversy presented to the trial court. Although the complaint may perhaps be construed to allege a controversy as to Question No. 1, the record does not support such a construction. The contention of the lessees relative to their right to repair was consistently linked with the asserted obligation of the lessor to bear the expense of such repair. Indeed, this was the very manner in which the point was expressed by the lessees in their statement of points on appeal filed with the court below pursuant to Rule 75(d) N.R.C.P.
It would appear that these new questions arose in the minds of the lessees only when, while the present appeal was pending, the decision in Ripps v. Kline was announced. The lessees are in the position of stating, "The Ripps decision has presented two additional questions as to which we now wish a declaration of rights." Such declaration cannot be asked, in the first instance, of an appellate court. Lickert v. Omaha, 144 Neb. 75, 12 N.W.2d 644; Thomson v. Public Service Com., 236 Wis. 157, 294 N.W. 517; Accord: Bliss Co. v. Cold Metal Process Co., C.C.A. Ohio, 102 F.2d 105; Walz v. Northcutt, 278 Ky. 616, 129 S.W.2d 124; Bank of Yorktown v. Boland, 172 Misc. 885, 16 N.Y.S.2d 756; Ferguson v. Housh, (Tex. Civ. App.), 227 S.W.2d 590; See: Borchard on Declaratory Judgments, 2d ed., page 253; Anderson on Declaratory Judgments, sec. 370, 487, 489.
Judgment affirmed with costs.

Case No. 3877
This is an appeal by the lessor from judgment denying her counterclaim for rent and requiring her to return to the lessees such rent as had been paid.
The lessees took possession of the premises in January, 1953. They were promptly advised that structural defects would have to be remedied before the remodeling contemplated by the lease could be had. In August they were actually evicted in connection with the city's demolition order. The lessor claims rent from January through July: from the date the lessees took possession until they were actually evicted. Upon this claim the trial court ruled that there had been a complete failure of consideration.
The lessor concedes that, due to the condition of the leased premises, it never was possible for the lessees to realize the purposes of their lease. She contends, however, that in order for the lessees to avoid liability for rent under these circumstances they must have surrendered possession of the leased premises. This would appear to be the general rule.
In the case at bar, however, due to the conduct of the lessor it was not until they were actually evicted that the lessees knew that the purposes of the lease would not be realized. The lessor undertook a structural survey of the premises. She encouraged the lessees to undertake a similar survey. Various plans were proposed for the restoration and strengthening of the premises, all for the avowed purpose of making the premises available to the lessees. Clearly they were led to believe by the lessor that, (regardless of the extent or lack of her obligation to do so), she was definitely contemplating reconstruction to remedy the structural defects. Clearly they acted in reliance upon this representation. When, because of the cost involved, the lessor eventually abandoned the project and resolved to submit to demolition, she neglected to advise the lessees of her decision.
The lessor is, then, estopped to assert the lessees' failure to surrender the lease.
The lessor contends that since the lessees did not expressly pray for a return of the sums paid as rental, the trial court erred in granting this relief. Rule 54(c) N.R.C.P. provides in part as follows: "Except as to a party against whom a judgment is entered by default, every final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings."
Judgment affirmed with costs.
BADT and EATHER, JJ., concur.
