
39 Cal.2d 654 (1952)
LAWRENCE BARKER, INC. (a Corporation), Respondent,
v.
WALTER M. BRIGGS, Appellant.
L. A. No. 21947. 
Supreme Court of California. In Bank.  
Oct. 10, 1952.
 Kenyon F. Lee, Thomas D. Mercola, Gibson, Dunn & Crutcher and Sherman Welpton, Jr., for Respondent.
 Richard Culbert Olson, as Amicus Curiae on behalf of Respondent.
 CARTER, J.
 Plaintiff, Lawrence Barker, Inc., recovered judgment entitling it to immediate possession of certain real property leased by it to defendant, Walter M. Briggs. The judgment provided that defendant was not entitled to take anything by reason of his counterclaim and that he was not entitled to a declaratory judgment by reason of his cross-complaint. Plaintiff recovered costs and attorney's fees. *656
 The lease involved in the controversy was entered into on January 1, 1945, for a 10-year term by Lawrence Barker, Inc., as lessor, and Walter M. Briggs, as lessee. The lease covered premises consisting of one lot located on Spring Street in the city of Los Angeles, which was to be used by the lessee as a parking lot. Pursuant to the lease, Briggs entered into possession and operated thereon an automobile parking lot or station. Subsequent to the execution of this lease, defendant Briggs, who operated approximately 70 other such lots in the vicinity of Los Angeles, entered into another parking lot lease with another lessor. This subsequent lease covered premises located on Main Street adjacent to the premises in question but separated by a 20-foot public alley. The premises in question will hereinafter be referred to as the Spring Street lot and the Main Street lot. The provisions of the lease involved here are as follows:
 "Second: The Lessee covenants and agrees to pay to the Lessor as a monthly rental for the demised premises the sum of One Thousand Two Hundred and Fifty ($1,250.00) Dollars per month, payable in advance upon the 1st day of each month of said term. In addition to the monthly rental payments, Lessee covenants and agrees annually to pay to the Lessor the amount, if any, by which sixty (60%) per cent of the gross income or receipts of the Lessee, derived in any manner, directly or indirectly, from or by the use or occupancy of said demised premises in any one calendar year, exceeds the sum of Fifteen Thousand ($15,000.00) Dollars. Lessee agrees annually to furnish to Lessor a report or statement, prepared and certified by a reputable Certified Public Accountant, showing said gross income or receipts of Lessee from said demised premises, as aforesaid, during the preceding calendar year, paying at the same time any such additional rent shown by said report or statement to be due the Lessor from the Lessee. Said report or statement shall be furnished, and said payment of additional rent, if any be due, shall be made, within a reasonable time after the close of each calendar year of the term of this lease, and in no event later than sixty (60) days after said close of said calendar year. The expense of said report or statement shall be borne by the Lessee."
 "Third: The Lessee has deposited with Lessor concurrently with the execution of this Lease certain stocks and securities. ... Said stocks and securities ... are deposited for the purpose of, and shall be held as, security to the Lessor for *657 the performance by the Lessee of all the terms, agreements, covenants and conditions of this lease. ... Title to said stocks and securities, originally constituting said 'deposit', has been transferred or shall be transferred to the name of Lessor, and Lessor may continue to hold said 'deposit' in its own name. ... In the event that Lessee, shall be in default under any of the terms, agreements, covenants, or conditions of this lease, other than the covenants for the payment of rent, and said default shall continue for the period of thirty (30) days, after notice by Lessor to Lessee, or if default be made in the payment of rent, when the same is due and payable, and said default in the payment of rent shall continue for a period of thirty (30) days, no notice of default in the payment of rent being necessary, Lessor may sell, at public or private sale, with or without notice, any or all of the stock or securities. ... Upon the expiration of ... this lease, provided Lessee be not in default at said time, or upon its earlier termination by the mutual consent of Lessor and Lessee, the 'deposit' shall be delivered by Lessor to Lessee and all rights of Lessor in and to said deposit shall thereupon cease and terminate. However, should Lessee, at said expiration of said stated term, the lease having not been terminated earlier by mutual consent, be in default under any of the terms, agreements, covenants and conditions of this lease, said 'deposit' shall continue to be held by Lessor until all such defaults of Lessee are cured, Lessor having during said period of default all of its original rights therein, as if the term of this lease had not expired. ..."
 "Ninth: It is expressly covenanted and agreed by and between the parties hereto that in case at any time default shall be made by the Lessee in the payment of any rent herein provided for upon the day when the same shall become due or payable, and such default shall continue for ten (10) days, or in case default shall be made by the Lessee in the performance of any of the other terms, conditions or covenants of said lease by said Lessee to be performed, other than the covenant for the payment of rent, and said default shall continue for a period of thirty (30) days after the service of written notice of such default by the Lessor on the Lessee (no notice of default in the payment of rent being necessary), ... then and in any of such cases, the Lessor may enter into and upon the demised premises or any part thereof and repossess the same, with or without terminating this lease, and without prejudice to any of its remedies for rent or breach of *658 covenant, and in any such event may, at its option, terminate said lease by giving written notice of its election so to do, or may, at its option, let the premises or any part thereof as the agent of the Lessee, or otherwise. ... The foregoing rights and remedies hereinabove given to the Lessor are, and shall be deemed to be, cumulative, and the exercise of one shall not be deemed to be an election, excluding the exercise by the Lessor at any other or different time of a different or inconsistent remedy, and shall be deemed to be given to said Lessor in addition to any other and further rights given or granted to said Lessor by the terms of paragraph 'THIRD' herein, or by law, and the failure upon the part of the Lessor at any time to exercise any right or remedy hereby given to it shall not be deemed to operate as a waiver by it of its right to exercise such right or remedy at any other or future time."
 Beginning in 1948, and after defendant had entered into the second lease covering the Main Street lot, when the Spring Street lot was filled with cars, defendant would move the "overflow" cars from Spring Street across the alley to the Main Street lot. He kept records of the number of cars so moved, but kept no records as to how much rental he received per car. For example, he could not tell whether he had received 25 cents, 50 cents or $1.00 or more for each of the cars moved. In accounting to the plaintiff-lessor, he allowed 25 per cent of the gross receipts on overflow cars parked on the Main Street lot. At about this time, he operated both lots at night with an attendant stationed on the Main Street lot. This attendant serviced cars entering on the Spring Street lot but issued Main Street parking tickets to them. During 1948, and until July, 1949, no records were kept of gross receipts for night parking on the Spring Street lot, although defendant allocated a portion of the Main Street night gross receipts to the Spring Street lot. Defendant continued to use the Spring Street lot as a feeder and driveway for the Main Street lot up until the time plaintiff discovered that method of operation and told him to desist. On July 27th, subsequent to notice given by plaintiff, defendant started to keep a record of night receipts derived from cars entering and parked on the Spring Street lot.
 Prior to the commencement of this action, defendant submitted annual reports or statements as required by the lease, although they were not certified, and the reports he did furnish were, with one exception, not furnished within the 60-day period from the close of the calendar year as required by *659 the lease. Plaintiff, prior to 1949, made no objection to the belated and inadequate reports. The 1949 report was submitted within the time provided for in the lease agreement.
 Plaintiff, on July 22, 1949, served on defendant written notice of default in which it claimed the right to repossess the premises without terminating the lease and without prejudice to any other rights provided for in the lease. Defendant claimed that he was not in default under the terms of the lease and refused to surrender possession. Plaintiff then brought this action for recovery of possession of the premises, defendant counterclaimed for damages for breach, by the plaintiff, of a covenant in the lease pertaining to a party wall. Defendant also filed a cross-complaint seeking declaratory relief, alleging that the terms and provisions of the lease were uncertain and ambiguous, and seeking an adjudication of the respective parties' rights thereunder.
 In the cross-complaint it was alleged that defendant had paid the minimum rent up until, and including, June 1, 1949; that commencing July 1, 1949, he has tendered to plaintiff the minimum rent per month plus the sum of $3,707.50 which represented additional rent for the calendar year of 1949 "in accordance with paragraph Second of said lease" but that plaintiff has refused to accept such tender; that the money is now on deposit in a special bank account. It is also alleged that an actual controversy exists between the parties as to the interpretation of the lease in that defendant claims that he is entitled to allocate gross income or receipts to the parking lot actually used to park the particular car, whereas plaintiff claims that, under the lease, if the cars enter the Spring Street lot but are parked in the Main Street lot, the receipts for those cars should be credited to the Spring Street lot. Defendant further alleges that his "method of allocating gross income or receipts as between the demised premises and other parking lots operated as a unit with the demised premises constitutes a fair and reasonable method of allocation and that cross-defendant received its just, fair and proportional share of the gross income or receipts attributable to the use or occupancy of the demised premises." Defendant alleges that plaintiff had waived strict compliance with the terms of the lease pertaining to statements or reports. The trial court was requested, if any money was found due and owing to plaintiff, to give defendant a reasonable opportunity to pay the same, to relieve him from default *660 and from any cancellation or the forfeiture of any of his rights.
 The minimum rental of $1,250 per month was the only rent paid by defendant and is not an issue in this case. Percentage rental for the calendar years 1945, 1946 and 1947 is not in issue. The dispute centers around the percentage rental for the calendar years 1948 and 1949.
 Defendant's Counterclaim
 Defendant's counterclaim was based on paragraph twelfth of the lease which reads as follows: "The demised premises as accepted by Lessee are subject to a party wall agreement with respect to the southern wall of the building adjoining the demised premises on the north. Pursuant to the terms of said agreement, Lessor has certain maintenance obligations with respect to said party wall. Lessor shall not be relieved of its said maintenance obligations with respect to said party wall and said obligations are not assumed by Lessee, except that should Lessee in some manner avail himself of the rights of Lessor in and to said party wall, and use said party wall in connection with said Lessee's use and occupation of the demised premises, then and in such event, Lessee shall be deemed to have assumed and thereafter shall perform all obligations of Lessor with respect to the maintenance of said party wall."
 Defendant alleged that during the period from approximately August 15, 1946, until October 15, 1946, through the negligence and carelessness of the plaintiff he was deprived of the use of the premises by reason of the party wall becoming a hazard to anyone using the premises, as a result of which the wall was condemned by the Building and Safety Department of the City of Los Angeles. It was alleged that he had not availed himself of the rights of the lessor in and to the party wall and that he had not used it in connection with the use of the premises. He prayed for damages in the sum of $3,731.20. Plaintiff objected to the introduction of evidence under the counterclaim on the ground that it was barred by section 339, subdivision 1 of the Code of Civil Procedure (liability not founded upon a writing) and that the counterclaim did not tend to diminish or defeat plaintiff's recovery. Defendant thereupon made an offer of proof to show that the city of Los Angeles had, on or about August 25, 1946, served defendant with a written notice which required him to immediately vacate and give up the use and *661 occupancy of the auto parking lot because of the dangerous condition of the premises and that as a result of this notice he was compelled to shut down the parking lot to his damage in the sum of $3,731.20. [1] It is defendant's contention that the applicable statute of limitation is found in section 337 of the Code of Civil Procedure (action founded upon a written instrument) and that the counterclaim was filed on October 3, 1949, less than four years from the date of the alleged breach by plaintiff of the provision contained in the lease. This would appear to be the correct statute of limitation. In Tagus Ranch Co. v. Hughes, 64 Cal.App.2d 128 [148 P.2d 79], the court held that all obligations and promises which the words of the writing necessarily import must be regarded as included in the terms of the writing, under section 337, Code of Civil Procedure. The cause of action here for damages did not arise until plaintiff breached the terms and provisions of the contract.
 Aside from the merits of the counterclaim, whether or not defendant may counterclaim depends on the type of plaintiff's action and whether or not it will "tend to diminish or defeat the plaintiff's recovery" (Code Civ. Proc.,  438). [2] Plaintiff maintains that its action is not one of ejectment, but that it was brought under section 793 of the Civil Code which reads as follows: "An action for the possession of real property leased or granted, with a right of re-entry, may be maintained at any time, after the right to re-enter has accrued, without the notice prescribed in section seven hundred and ninety-one." (See Code Civ. Proc.,  1159 et seq.) Inasmuch as plaintiff did not comply with the statutory notice requirements for unlawful detainer, it would appear that this is not such an action.
 [3] If the action is one in ejectment as it appears to be and which is proper in such a situation (Roffinella v. Roffinella, 191 Cal. 753 [218 P. 397]; B. & B. Sulphur Co. v. Kelley, 61 Cal.App.2d 3 [141 P.2d 908]), then the question arises whether the defendant's claim will tend to diminish or defeat plaintiff's recovery. Plaintiff seeks no money damages other than attorney's fees, as provided for in the lease, but such fees would seem to be a sufficient prayer for damages to entitle defendant to counterclaim for damages suffered by him because of plaintiff's alleged breach of the twelfth paragraph of the lease which pertains to maintenance of the party wall. *662
 Defendant's Cross-Complaint for Declaratory Relief
 The defendant contends that the trial court abused its discretion in denying declaratory relief under the cross-complaint. The trial court found that in view of the findings made, there was no occasion to enter any declaratory judgment; that plaintiff was entitled to be placed in immediate possession of the leased premises but made no finding as to whether or not plaintiff was entitled to repossession of the premises without terminating the lease. More specifically the trial court found that the reports furnished to plaintiff, with one exception, although prepared and signed by a member of a firm of certified public accountants, were not certified and were not furnished within the 60-day period and that they did not correctly reflect the gross income attributable to the use and occupation of the leased premises. It was also found that the gross revenue attributable to the leased premises for the year 1949 should have been $35,485.60 instead of $31,179.17, as reported by defendant; that the sum of $3,707.50 tendered by defendant to, and refused by, plaintiff, should have been the sum of $6,291.36. It was further found that plaintiff had not waived "these defaults" and had not led the defendant to believe that strict compliance with the terms of the lease would be waived in the future.
 Other than the specific references made, and the use of the words "these defaults," the trial court made no attempt to construe the lease. No finding was made as to whether plaintiff's interpretation of the terms of the lease is the correct one, and although it may be inferred that defendant was in default because of his interpretation of the lease, no finding is made thereon. The findings as to the incorrect gross receipts report could, moreover, refer either to the overflow and night parking receipts or to the gross receipts on cars actually parked on the Spring Street lot.
 The percentage rental plaintiff was to receive over and above the minimum monthly rental was to be the amount by which 60 per cent of the gross receipts exceeded the sum of $15,000, and was to be based on gross income "derived in any manner, directly or indirectly, from or by the use or occupancy of said demised premises." No finding other than by implication from the judgment was made as to whether this provision of the lease applied to the manner in which defendant operated the two lots (parking cars entering Spring Street in the Main Street lot) so as to entitle plaintiff to the revenue *663 received in thus placing defendant in default for failing to account therefore other than on a percentage basis.
 In Judd v. Board of Education, 278 N.Y. 200 [15 N.E.2d 576, 118 A.L.R. 789], the court said: "The two words (directly or indirectly) must have been used with some definite intent and purpose; otherwise why were they used at all? Aid furnished 'directly' would be that furnished in a direct line, both literally and figuratively, to the school itself, unmistakably earmarked, and without circumlocution or ambiguity. Aid furnished 'indirectly' clearly embraces any contribution, to whomsoever made, circuitously, collaterally, disguised, or otherwise not in a straight, open and direct course for the open and avowed aid of the school, that may be to the benefit of the institution or promotional of its interests and purposes. How could the people have expressed their purpose in the fundamental law in more apt, simple and all- embracing language?" (See, also, Nelson v. Johnson, 38 Minn. 255 [36 N.W. 868]; Kirkpatrick v. State, 177 Ark. 1124 [9 S.W.2d 574].) In Goodman v. Global Industries, 80 Cal.App.2d 583, 587 [182 P.2d 300], the court, in construing section 342 of the Civil Code had this to say concerning the legislative use of the words "directly or indirectly": "The words 'directly or indirectly' indicate the intention to comprehend and include all types of repurchases however devised, and when the section is read in its entirety it is clear ... that it was designed to prohibit any purchase by a corporation of its own shares except under conditions prescribed within the section's own four corners."
 [4] The words "directly or indirectly" and "from or by the use or occupancy" of the premises could be construed in accordance with plaintiff's theory or, as defendant contends that they should be construed, namely, that he, defendant, was to account to plaintiff for only a percentage of the revenue received for cars entering the Spring Street lot but actually parked on the Main Street lot and for cars entering the Main Street lot at night and thereafter parked on the Spring Street lot. If, as defendant contends, plaintiff is entitled only to a percentage of the revenue, rather than the entire revenue, from cars so parked, then the determination of the amount of that percentage is a question for the trial court. It is clear, therefore, that defendant stated a cause of action for declaratory relief and that the trial court erred in finding that "there is no occasion to enter any declaratory judgment." *664
 Termination of the Lease
 [5] Defendant contends that plaintiff cannot maintain an action in ejectment without terminating the lease, and that he is entitled to relief from forfeiture.
 In Yates v. Reid, 36 Cal.2d 383 [224 P.2d 8], although the facts differ from the case under consideration, the lease contained a provision that in the event of abandonment or vacation of the premises by the tenant, the lessor could reenter and take possession and might "at his option, either terminate this lease and recover from the Lessee all damages caused by the breach hereof of the Lessee .... No re- entry of said property by the Lessor, as herein provided, shall be construed as an election on his part to terminate this lease, unless written notice to that effect is delivered to the Lessee. ..." This court held that the retaking of possession by the plaintiff as landlord and his reletting of the premises were entirely consistent with the rights of the tenants under the lease; that the plaintiff did no more than exercise the rights accorded to him; that the provision in the lease was valid and controlling (Burke v. Norton, 42 Cal.App. 705 [184 P. 45]; Brown v. Lane, 102 Cal.App. 350 [283 P. 78]; Security Realty Co. v. Kost, 96 Cal.App. 626 [274 P. 608]).
 In Burke v. Norton, supra, 42 Cal.App. 705, again the same provision was involved and plaintiff-lessor brought an action to recover rent, attorney's fees, damages and restoration of the premises. There, the court, quoting from Grommes v. St. Paul Trust Co., 147 Ill. 634 [35 N.E. 820, 37 Am.St.Rep. 248], said: " 'There is nothing illegal or improper in an agreement that the obligation of the tenant to pay all the rent to the end of the term shall remain, notwithstanding there has been a re-entry for default; and if the parties choose to make such an agreement, we see no reason why it should not be held valid as against both the tenant and his sureties.' We think this language is applicable to the case at bar. To hold otherwise, it seems to us, would be to place a lessee in a position to retain the premises without the payment of rent, and to compel the lessor to rely wholly upon the financial responsibility of the lessee and seek his rent from month to month by action, or to wholly terminate the lease, either of which would be less advantageous to the landlord than the right to re-enter and, if necessary, to relet the premises, looking to the lessee for only that portion of the rental reserved which represents the difference between what the landlord could obtain from any person upon such reletting and the *665 total monthly rental. We do not hesitate to say that a construction which would thus permit a lessee to determine his own liability is, as we understand them, repugnant to the decisions of this state [citing many cases]. From what we have said, it follows that the court erred in declaring a forfeiture of the lease." It would follow from the above quoted decision that so far as the reentry and repossession of the premises by plaintiff was concerned, defendant suffered no forfeiture.
 Paragraph third of the lease heretofore quoted contains provisions relating to the deposit which was intended by the parties as security for the faithful performance of the terms, conditions and covenants of the lease. It was specifically provided that plaintiff could hold or sell the securities so deposited, upon defendant's default, either during, or at the end of, the term of the lease. It would appear that the retention of this sum by plaintiff does not constitute a forfeiture. Moreover, defendant does not request that it be returned to him. It is difficult to see where there is any forfeiture involved here.
 Defendant does pray that if the court finds that any sum is owed by him to plaintiff he be given a reasonable time within which to pay it. Plaintiff does not request any damages, nor any money whatever except for attorney's fees and costs. The trial court did find, as heretofore set forth, that defendant had not tendered the correct amount to plaintiff as percentage rental for the calendar year 1949. It would appear that any finding as to the amount of percentage rental owing by defendant (under plaintiff's construction of the lease) would be pure speculation in the absence of any records as to the revenue collected in the daytime for cars entering the Spring Street lot but parked in the Main Street lot, and the number of cars either parked in, or which entered, the Spring Street lot during the nighttime parking hours.
 In the absence of any findings on material issues presented (wherein lay defendant's default, other than the belated and uncertified annual reports; whether or not the second paragraph of the lease is to be interpreted according to the theory advanced by plaintiff or defendant; whether plaintiff has the right to possession without terminating the lease; whether plaintiff has the right to retain the security deposit) the case must be reversed. As this court said in Dabney v. Philleo, 38 Cal.2d 60, 69- 70 [237 P.2d 648]: "It is apparent that there was a justiciable controversy between *666 plaintiffs and Clifford's assignees. The trial court should have expressly declared their rights. (Essick v. City of Los Angeles, 34 Cal.2d 614, 624 [213 P.2d 492].)"
 Another error warranting reversal is found in the trial court's refusal to allow the introduction of evidence on defendant's counterclaim inasmuch as the action was not barred by the applicable statute of limitations (Code Civ. Proc.,  337), appears to be one of ejectment, and the claim would tend to diminish or defeat plaintiff's recovery.
 Judgment reversed.
 Gibson, C.J., Shenk, J., Schauer, J., and Spence, J., concurred.
 TRAYNOR, J.,
 Concurring and Dissenting.
 I agree that the trial court erred in refusing to admit any evidence relating to the party wall and that the cause should therefore be remanded for a new trial on the issues raised by the counterclaim. On the basis of the provision in the lease that "Lessor shall not be relieved of its said maintenance obligations with respect to said party wall," defendant offered to prove that "the lessor plaintiff both expressly and impliedly agreed to maintain and keep in repair this party wall so far as the lessee is concerned, in conjunction with its contractual liability with the contiguous owner under a party wall agreement." The counterclaim quotes the paragraph of the lease stating the parties' obligations with respect to the party wall, and alleges that the "plaintiff herein negligently and carelessly failed to maintain said party wall in a safe condition." The words "negligently and carelessly" do not prevent defendant from proving a cause of action in contract (see L. B. Laboratories, Inc. v. Mitchell, ante, pp. 59, 60 [244 P.2d 385]; George v. Bekins Van & Storage Co., 33 Cal.2d 834, 841 [205 P.2d 1037]), and since the alleged obligation was based on the written lease, section 337(1) appears to be the applicable statute of limitation. Accordingly, the trial court erred in rejecting the offer of proof.
 On the other issues, I concur in the dissenting opinion of Mr. Justice Edmonds.
 EDMONDS, J.
 The counterclaim of Briggs does not charge Barker with any breach of contract to maintain a party wall. At most, the pleading states a cause of action in tort which would lie against either owner of the wall for permitting *667 it to become a private nuisance. For that reason, section 337(1) of the Code of Civil Procedure relating to "[a]n action upon any contract, obligation or liability founded upon an instrument in writing" is not the applicable statute of limitations.
 The lease does not contain any obligation or promise, express or implied, whereby Barker promises Briggs that the wall will be kept in repair. It states that the demised premises are subject to a party wall agreement whereby Barker has certain maintenance obligations. What these obligations are, or with whom, is not specified. Presumably they are owed to the other owner of the party wall. The lease further provides that Briggs is not to be liable for these obligations except under certain circumstances which are alleged not to have occurred. Barker is to remain obligated under the party wall agreement. The most which can be construed from this provision is that Briggs, as lessee, is to be protected against an assumption of a covenant with some third party. The only promise is that Briggs will not be held liable for any obligations under this separate agreement.
 The facts alleged in the counterclaim do not support a charge that Barker breached its obligation to Briggs to protect him from liability for the party wall agreement. There is no claim that the cause of action is based upon the party wall agreement, nor is it alleged that the agreement is in writing and that Briggs is a third-party beneficiary of it. (Cf. Division of Lab. Law Enforcement v. Dennis, 81 Cal.App.2d 306 [183 P.2d 932].)
 Tagus Ranch Co. v. Hughes, 64 Cal.App.2d 128 [148 P.2d 79], is cited for the proposition "that all obligations and promises which the words of the writing necessarily import must be regarded as included in the terms of the writing, under section 337, Code of Civil Procedure." Although the statement of the rule of that case is correct, it is not here applicable. In the Tagus Ranch case, the instrument read: "I ... hereby confess and acknowledge that I have stolen and embezzled from you" a certain sum of money. The court, quite properly, construed this to imply, as a matter of law, a promise to repay the sum embezzled. According to the court, "The obligation to repay could be established by the use of these writings and there would be no need for evidence of facts and occurrences outside of those appearing on the face of the instruments. Under these circumstances we think *668 the writings in question are sufficient to bring the action within the provisions of the four-year statute above mentioned." (P. 131.)
 In support of this conclusion, the court relied upon O'Brien v. King, 174 Cal. 769 [164 P. 631], which stated the rule as follows: "A cause of action is 'founded upon an instrument of writing' when the contract, obligation, or liability grows 'out of written instruments not remotely or ultimately, but immediately.' " (P. 772.) The O'Brien case concerned an instrument reading: "Received from Miss Hannah O'Brien, ... $450 ... at 5 per cent interest." The court said: "The reasonable--indeed, the only reasonable--meaning of these words is that the money was received as a loan at the specified interest rate. A loan being established by the writing, a promise to repay is implied by necessary inference of law and fact. Such promise is embodied in the language of the writing, although not expressed in the words 'I promise to pay.' " (P. 773.) According to the court, "promises 'merely implied by law' from a situation evidenced by a writing, i.e., quasi contracts, are not within the statutory provision under discussion. The promise must be one arising directly from the writing itself, and included in its terms. But in determining whether the obligation is 'supported by an express promise or stipulation in the written instrument,' we must regard, as included in the terms of the writing, all obligations and promises which its words necessarily import." (P. 774.)
 In McCarthy v. Mt. Tecarte L. & W. Co., 111 Cal. 328 [43 P. 956], the plaintiff, director of the corporation, attempted to rely upon a resolution of the board of directors appointing him superintendent of the company. The resolution did not fix any compensation for the position, and plaintiff was entitled to none unless the circumstances raised an implied assumpsit. The court said: "But a cause of action is not upon a contract founded upon an instrument in writing, within the meaning of the code, merely because it is in some way remotely or indirectly connected with such an instrument, or because the instrument would be a link in the chain of evidence establishing the cause of action. In order to be founded upon an instrument in writing, the instrument must, itself, contain a contract to do the thing for the nonperformance of which the action is brought." (P. 340.) Therefore, the court concluded, the plaintiff's cause of action, not being based upon a written instrument, was barred by section 339(1). *669 It summarized the situation as follows: "Appellant could not have been precluded from showing affirmatively that no compensation was intended or expected, upon the ground that it would have been an attempt to contradict a written instrument. If respondent have any cause of action, it is upon an understanding of appellant and the expectation of respondent that he would be compensated, which may be implied, if the evidence be sufficient, from all of the circumstances of the case, and not upon any written instrument." (P. 342.)
 In the present case, the lease provision that Barker will remain obligated upon the separate party wall agreement may be some evidence of its liability in tort for failure to maintain the wall. But it would not be precluded by the rule of integration from proving that it is not subject to such liability. From all that appears, its obligations under the agreement may have been no more than to paint or light the wall. The lease contains no promise that Barker will repair the wall, or so maintain it that it will not become a nuisance. If this is Barker's obligation, it can be proved only by evidence of the agreement or other evidence outside the lease. The counterclaim is based upon Barker's negligence and carelessness in maintaining the wall, as a result of which it became a hazard. Barker's liability, if any, for this condition does not arise "immediately" out of a written instrument. The lease does not contain a contract to keep the wall in repair, for nonperformance of which the action is brought. Therefore, the action is barred by section 339(1) of the Code of Civil Procedure which requires that an action "upon a contract obligation or liability not founded upon an instrument in writing" must be commenced within two years.
 As another ground for reversal of the judgment, it is held that Briggs stated a cause of action for declaratory relief and the trial court erred in deciding that he was not entitled to such a judgment. (Dabney v. Philleo, 38 Cal.2d 60, 70 [237 P.2d 648]; Essick v. City of Los Angeles, 34 Cal.2d 614, 624 [213 P.2d 492].) However, whether, under all of the circumstances, a declaration of the rights of the parties is necessary or proper is a matter within the discretion of the trial court, and in the absence of a clear showing of abuse of that discretion, which does not appear here, its decision will not be disturbed upon appeal. (Code Civ. Proc.  1061; Hannula v. Hacienda Homes, Inc., 34 Cal.2d 442, 448 [211 P.2d 302, 19 A.L.R.2d 1268]; California Physicians' Service v. Garrison, *670 28 Cal.2d 790, 801 [172 P.2d 4, 167 A.L.R. 306]; Moss v. Moss, 20 Cal.2d 640, 643-644 [128 P.2d 526, 141 A.L.R. 1422); Cutting v. Bryan, 206 Cal. 254, 257 [274 P. 326].)
 Barker's complaint and supplemental complaint alleged that Briggs was in default under the second paragraph of the lease by failure to furnish certified statements and pay the additional rental of 60 per cent of the gross income or receipts in excess of $25,000 derived in any manner, directly or indirectly, from the use or occupancy of the premises. The pleader claimed the right, by reason of these defaults, to reenter and repossess the premises without terminating the lease. According to the supplemental complaint, the lease does not authorize any allocation or proration of receipts between the demised premises and the other parking lots not belonging to Barker.
 By amended answer to the complaint and answer to the supplemental complaint, Briggs admitted his failure to file a certified statement within the proper time in 1948, but claimed that Barker had waived the provisions of the lease in this respect by accepting, in prior years, unverified statements later than the time specified. He denied that the 1949 statement did not comply with the lease. Briggs also denied that he had failed to pay the additional rental provided in the lease and was in default. Therefore, he said, Barker is not entitled to reenter and repossess the premises without terminating the lease. According to Briggs, "The dispute, if any, over the amount of rent owed ... arises from the manner in which defendant has apportioned gross receipts from the operation of all of defendant's parking lots to the use or occupancy of the demised premises. ... Plaintiff is not entitled to receipts from the parking of cars on the adjoining lots not owned by plaintiff."
 As stated by Briggs in his cross-complaint, it was his custom to operate the demised premises and two other lots as a single unit from time to time and he alleged that he maintained records to show "the gross profits fairly attributable to the use and occupancy of the demised premises." He claimed the right under the lease "to allocate gross income or receipts to the parking lot on which a particular automobile is parked when overflow cars enter the demised premises but are parked on adjoining lots." He also pleaded that "his method of allocating gross income or receipts as between the demised premises and other parking lots operated as a unit with the demised premises constitutes a fair and reasonable method of allocation and that cross-defendant received its just, fair and proportional *671 share of the gross income or receipts attributable to the use of occupancy of the demised premises." According to Briggs, unless he secures a declaration of his rights Barker "will endeavor to terminate and cancel the rights of cross-complainant in and to the lease ... and will forfeit and use the deposit of the cross-complainant put up on said lease."
 The basic issues joined by the pleadings were simply whether Briggs was in default under the terms of the lease and, if so, whether Barker was entitled to repossession without terminating the lease. Insofar as the alleged default in payment of additional rentals is concerned, Briggs asserted that he was entitled to allocate receipts between the several lots. No new issue was raised by the cross-complaint for declaratory relief.
 "The purpose of section 1060 et seq. of the Code of Civil Procedure, providing for actions for declaratory relief, is to provide a ready and speedy remedy in cases of actual controversy relating to the legal rights and duties of the respective parties. By section 1061 the court is permitted to refuse to exercise the power in any case where its declaration or determination is not necessary under the circumstances. This is such a case. All the issues raised in the cross-complaint can be readily determined in the trial of the special defenses raised in the answer and, because this affirmatively appears upon the face of the pleading, the trial court properly refused to exercise the power granted by these sections of the code." (Welfare Inv. Co. v. Stowell, 132 Cal.App. 275, 278 [22 P.2d 529]; Sunset Scavenger Corp. v. Oddou, 11 Cal.App.2d 92, 96 [53 P.2d 188].)
 The trial court found that in 1946 Briggs did not furnish a report prepared and certified as required by the lease and that the reports which he supplied in 1947, 1948 and 1949 were neither certified nor presented within the time provided by the lease. With regard to these reports, it said that, "It is not true that these reports correctly reflected the gross income attributable to the use and occupation by the defendant of the leased premises." As a portion of this finding concerning reports, the court declared: "It is not true that the plaintiff, ... waived these defaults, or led the defendant to believe that strict compliance in the future with the terms of the Lease would not be required."
 The court then found that a certified report was furnished within the proper time for the year 1949, but that it showed a gross revenue attributable to the leased premises of $35,485.60, rather than the sum of $31,179.17 which Briggs reported *672 to Barker. This report, the court said, did not correctly reflect the gross income attributable to the use of the premises. The court also found that the payment of $3,707.50 which Briggs tendered after commencement of the action, should have been in the amount of $6,291.36. From these findings, the court concluded that Barker was entitled to a judgment for immediate possession of the property and that Briggs was not entitled to a declaratory judgment.
 Because of asserted deficiencies in the findings, it is now held that the judgment must be reversed. However, even if we assume that the findings are insufficient, this court "may make findings of fact contrary to, or in addition to, those made by the trial court." (Code Civ. Proc.  956a.) In Tupman v. Haberkern, 208 Cal. 256, 266 [280 P. 970], the court explained the purpose of section 956a to be that, "whenever possible, and the interests of justice would seem to require, the reviewing court should have the power to make new findings contrary to or in addition to those made by the trial court, either on the record presented or on new evidence to be taken under the direction of the court, all with references to material issues framed by the pleadings, to the end that the judgment or order appealed from may be affirmed and further litigation terminated." The constitutional and statutory provisions which empower this court to affirm, modify or direct the entry of a final judgment are to be liberally construed toward the end that a cause may be disposed of on a single appeal. (Cal. Const., art. VI,  4 3/4; Code Civ. Proc.  53, 956a; American Enterprise, Inc. v. Van Winkle, ante, pp. 210, 219 [246 P.2d 935]; Tupman v. Haberkern, supra; Gudger v. Manton, 21 Cal.2d 537, 547 [134 P.2d 217]; Culjak v. Better Built Homes, 58 Cal.App.2d 720, 725 [137 P.2d 492].)
 Where the error in an action for declaratory relief consists of entering a judgment of dismissal rather than decreeing expressly that the complainant is not entitled to declarations in his favor (as is implied by the judgment of dismissal), the court may modify the judgment by inserting an express declaration of the rights of the parties. (Essick v. City of Los Angeles, 34 Cal.2d 614, 624-625 [213 P.2d 492].) In the Essick case the judgment was affirmed, as modified, although the trial court erroneously failed to declare the rights of the parties. Because the evidence contained in the record was sufficient to empower the court to modify the judgment, the *673 error in entering a judgment of dismissal was not prejudicial. Under the circumstances, no reversal was required.
 The present decision implicitly approves the trial court's findings, as far as they go, with the exception of the specification of the amount of additional rental which Briggs should have paid, a determination which is unnecessary to the judgment. These findings are sufficient to sustain the judgment restoring Barker to possession and allowing attorney's fees and costs. Even if additional findings were necessary, the record would enable this court to supply them and modify the judgment. No extrinsic evidence has been offered to aid in the interpretation of the terms of the lease, nor is it contended that any such evidence is required. The document is in evidence and may as readily be interpreted by this court as by the trial court.
 The majority have gone halfway in supplying the findings which they say are missing by determining that, if Briggs has breached the terms of the lease, Barker is entitled to possession without terminating the lease and may retain the security deposit in accordance with its terms. This conclusion is based upon the correct interpretation of the lease provisions. However, no issue was raised by the cross-complaint concerning either of these points and there was no necessity to grant declaratory relief for the sole purpose of deciding them.
 "As to the principles governing appellate courts in considering the adequacy of findings to dispose of issues and support a judgment it is a general rule that 'Even though a finding might have been more clearly phrased, it is sufficient if its language is clear enough to indicate what the court intended; and if there are findings sufficient to support the judgment, they are not vitiated by the unintelligibility of others. Any uncertainty in the findings will be construed so as to support the judgment rather than to defeat it.' ... It is also to be noted that while full findings are required upon all material issues a judgment will not be set aside on appeal because of a failure to make an express finding upon an issue if a finding thereon, consistent with the judgment, results by necessary implication from the express findings which are made." (Richter v. Walker, 36 Cal.2d 634, 639-640 [226 P.2d 593].)
 Also, "[i]t is well settled, in spite of the fact that section 633 of the Code of Civil Procedure provides that facts and conclusions must be separately stated, that a finding may be *674 regarded as one of fact, although mistakenly placed among the conclusions of law." (Linberg v. Stanto, 211 Cal. 771, 776 [297 P. 9, 75 A.L.R. 555].) "It is also the rule that findings are sufficient if they can be made certain by reference to the record" (Ethel D. Co. v. Industrial Acc. Com., 219 Cal. 699, 708 [28 P.2d 919]) or the pleadings. (Kennedy & Shaw Lbr. Co. v. S. S. Const. Co., 123 Cal. 584, 585-586 [56 P. 457].)
 Although the findings in this case are far from ideal, and should have been drawn with more certainty, the weakness in them is not fatally defective. (Richter v. Walker, supra.) Upon the ultimate fact of whether Briggs was in default under the provisions of the lease, the court found that he did not report the proper gross receipts attributable to the use and occupation of the leased premises. From a review of the record, it is obvious that the finding also was intended to encompass a failure to pay the correct amount of additional rental.
 The majority object to the findings of an incorrect report of gross receipts upon the ground that they could "refer either to the overflow and night parking receipts or to the gross receipts on cars actually parked on the Spring Street lot." However, "[t]he court's finding was upon the ultimate fact in issue and was therefore sufficient." (Estate of Janes, 18 Cal.2d 512, 514 [116 P.2d 438].) It was not necessary for the court also to find upon the probative facts from which it deduced the ultimate fact of failure to comply with the provisions of the lease. (Klein v. Milne, 198 Cal. 71, 75 [243 P. 420].)
 Ample support for the finding that Briggs failed properly to account for gross receipts is provided by the undisputed evidence that, for more than a year, no records were kept of gross receipts for night parking. This breach of the lease is sufficient of itself to give Barker the right to possession. In addition, there is some indication in the record that the trial court intended to construe the lease contrary to Briggs' claim of a right to allocate receipts to various lots. However, the finding being supported by other sufficient evidence, it is unnecessary for this court to consider that question of interpretation. "It is, of course, immaterial that the theory upon which the judgment may be affirmed is not identical with that relied upon by plaintiffs or by the trial court, since plaintiffs are required only to plead and prove facts sufficient to justify relief, and the trial court's judgment must be affirmed if the findings, supported by the evidence, are sufficient *675 to warrant the relief granted on any legal theory." (Sears v. Rule, 27 Cal.2d 131, 140-141 [163 P.2d 443].)
 Among the findings of fact there is none directed specifically to the question of whether Barker has the right to possession without terminating the lease. However, there is a so-called conclusion of law providing: "That plaintiff is entitled ... to be placed in the immediate possession of said real property." This is, in effect, a finding upon an ultimate fact in issue, and may be treated as such. (Linberg v. Stanto, supra.) Even if it were not to be considered as a finding of fact, a determination that Barker is entitled to immediate possession of the property results by necessary implication from the express finding that Briggs is in default under the lease. It is obvious from the lease, as construed by the majority, that, if Briggs is in default, Barker is entitled to possession without terminating the lease. The finding must be interpreted to include the right to continue the obligations of the lease. The only issue raised by the pleadings was whether the lease had been breached so that Barker had the right to possession without terminating it. There was no issue as to whether he had the right to possession, but not the right to continue the lease in effect.
 Construing the findings so as to support the judgment rather than defeat it (Richter v. Walker, supra,) I conclude that they are sufficient to determine the cause without the necessity of making additional findings. Those which were made, supported by sufficient evidence, eliminated any necessity for determining whether Briggs' interpretation of the lease in regard to allocation of rentals was correct. The court having found that Briggs was no longer entitled to possession of the property, his interpretation of the additional rental provision became an immaterial issue and the failure to find thereon does not constitute prejudicial error. (Merrill v. Gordon & Harrison, 208 Cal. 1, 6 [279 P. 996]; Woodhead v. Wilkinson, 181 Cal. 599, 602 [185 P. 851, 10 A.L.R. 291].)
 For these reasons, I would affirm the judgment.
