
246 Cal.App.2d 498 (1966)
CINMARK INVESTMENT COMPANY, Defendant, Cross-complainant and Appellant,
v.
DONALD B. REICHARD et al., Defendants, Cross-complainants and Respondents.
Civ. No. 29033. 
California Court of Appeals. Second Dist., Div. Four.  
Nov. 17, 1966.
 Daniel L. Rothman and Neville H. Shear for Defendant, Cross-complainant and Appellant.
 Ross & Feinberg and James R. Ross for Defendants, Cross-complainants and Respondents.
 JEFFERSON, J.
 In 1958, appellant Cinmark Investment Company entered into an agreement leasing with option to purchase, for an 11-year term, approximately 15 acres of unimproved farming land owned by respondents Donald and Alta Reichard. Thereafter, a portion of the property subject to the lease and option agreement, about 4 percent or .6 acres, was condemned for highway purposes by the city. Appellant and respondents were both named as party defendants in the condemnation proceedings. An award of $12,489 was subsequently made. Appellant, by a cross-complaint in the same proceedings, instituted this action seeking a declaration of its rights under the part of the agreement providing the option to purchase. Respondents brought a cross- action, with a "cross-cross-complaint", alleging entitlement under the terms of the lease, to the full condemnation award rather than the usual apportioned amount compensating the lessee for the loss of its leasehold interest. The matter was tried and the trial court entered a judgment, in appellant's favor, ordering that the $12,489 award be apportioned pursuant to Code of Civil Procedure section 1246.1, appellant to receive $2,150 and respondents $10,339. The trial court, however, did not render the declaration of rights sought by appellant.
 There is no argument with respect to the court's decision as to the apportionment of the condemnation award. Appellant brings this appeal contending that the trial court erred in failing to declare its rights under the option agreement.
 The lease-option agreement provided that any time during the period the lease was in effect, the lessee (appellant) had the option to purchase the approximately 15 acres of leased land, in parts at $17,500 per acre, or for a total price not to exceed $210,000 for all of the land--an amount considerably less than the per-acre price. The contract contains intricate provisions for fixing the terms of the trust deeds to be given to secure portions of the purchase price.
 Appellant, in its prayer for declaratory relief, asked the court below to declare that, in the event it should exercise the option to purchase the entire leased land, it would be entitled to an offset on the $210,000 total option price equal to the *501 amount of the condemnation award received by respondents. Appellant contended that this declaration is necessary in order to preserve the original intention and true agreement of the parties. It was argued that, without the set-off, appellant would have to pay $210,000 for a lesser parcel of land--diminished by the amount taken by the condemnation--while respondents would have a windfall, for they would receive the full option price of $210,000, plus the amount of the apportioned option award, namely $10,339, or a total of $220,339.
 [1] The following rules are pertinent: "A complaint for declaratory relief is legally sufficient if it sets forth facts showing the existence of an actual controversy relating to the legal rights and duties of the respective parties under a written instrument and requests that these rights and duties be adjudged by the court. [Citations.]" (Maguire v. Hibernia Sav. & Loan Soc., 23 Cal.2d 719, 728 [146 P.2d 673, 151 A.L.R. 1062]; Rubin v. Toberman, 226 Cal.App.2d 319, 325 [38 Cal.Rptr. 32]; Code Civ. Proc.,  1060.) [2] "Although under the declaratory relief statute (Code Civ. Proc.,  1060-1062a), wide powers have been conferred upon the trial court, its discretion is not unlimited. ... Where, therefore, a case is properly before the trial court, under a complaint which is legally sufficient and sets forth facts and circumstances showing that a declaratory adjudication is entirely appropriate, the trial court may not properly refuse to assume jurisdiction; ..." (Columbia Pictures Corp. v. DeToth, 26 Cal.2d 753, 762 [161 P.2d 217, 162 A.L.R. 747]; Browning v. Aymard, 224 Cal.App.2d 277, 280 [36 Cal.Rptr. 604].)
 [3] Here, appellant filed a cross-action for declaratory relief in the condemnation proceedings and the matter was tried with respondents' cross-action. The trial court gave judgment only in the latter action failing to make any declaration of rights one way or the other in appellant's action. We conclude, in the light of the above rules, that a justiciable controversy was presented and that appellant was entitled to the declaratory relief sought. However, instead of reversing the judgment and sending it back to the trial court for the required declaration, we have concluded that it is proper for us to undertake this task. At the trial the parties had the opportunity to offer such evidence as they wished to aid the interpretation of the contract. Both in the trial court and in their briefs here they have argued their respective viewpoints. The issue is one of law. (See Parsons v. Bristol *502 Development Co., 62 Cal.2d 861 [44 Cal.Rptr. 767, 402 P.2d 839].)
 [4] A judgment in a declaratory relief action which fails to determine all of the rights between the parties under a lease, may be modified on appeal to supply that which should have been determined by the trial court, under the rule of liberal construction of the constitutional and statutory provisions empowering a reviewing court to affirm, modify or direct entry of a final judgment, toward the end that a cause may be disposed of on a single appeal. (American Enterprise, Inc. v. Van Winkle, 39 Cal.2d 210, 219 [246 P.2d 935].)
 [5] The lease-option agreement contains no provision covering the issue raised. There is a clause which refers to dedications of part of the property for street purposes, the clause providing "... that such dedication by lessors (respondents) shall be without cost to the lessors and without responsibility upon the lessors to pay for or to complete any such improvements, and shall have no effect whatsoever upon the rental provisions of this lease, or upon the purchase price of the option to purchase." Respondents point out that the property had no access streets and was used exclusively for agricultural purposes; that appellant intended to put in streets and to convert the property to a manufacturing use; that since, under the terms of the lease, appellant would be required to pay any costs incurred in making the street improvements and would also lose the property upon which the streets were located, when the city stepped in and by the condemnation took over this expense, appellant was in fact benefited.
 Respondents take comfort from the fact there is no showing that appellant would have had more property for its development, or property other than that taken, had they personally dedicated the land for the streets. But, on the other hand, our review of the record fails to disclose any evidence that the contrary is true, namely, that the streets built by the City of Los Angeles are the equivalent of the streets which would have been built had the condemnation not occurred and the parties gone forward with the contemplated subdivision of the property and the dedications necessary for the related street improvements. Consequently, the argument for applying the provisions in the lease respecting voluntary dedications of the property to the situation presented here where property was involuntarily taken through condemnation proceedings, is without force. *503
 A case involving the same issue as that presented here was Cullen & Vaughn Co. v. Bender Co. (1930) 122 Ohio St. 82 [170 N.E. 633, 68 A.L.R. 1332]. In Cullen, a lessee was in possession of land under a lease for a term of years. The lease contained a clause giving the lessee an option to purchase the land at any time during the term of the lease for a stated purchase price. During the period the lease was in effect a portion of the land was appropriated for public use and the lessor received compensation therefor. The lessee, on subsequently exercising the option to purchase, claimed it was entitled to a credit against the agreed purchase price equal to the amount of the compensation paid to the lessor. The court agreed, stating (at p. 637): "In this case a lease was executed, and one of its conditions was that the lessee might purchase the property for a fixed sum at any time during the term of the lease. The lessee was in possession. By virtue of the stipulation, he was entitled to the whole of the property by paying the sum stated. Before the exercise of the option, a part of the property was taken for public use, for which compensation was paid. Under such circumstances the option of purchase must be presumed to have been one of the controlling factors, on the part of the lessee, in determining to execute the lease. The doctrine of equitable conversion applies. It no longer being possible to convey the entire property, the fund which represents the part conveyed belongs to the lessee, as purchaser." (See also cases collected in annotation in 68 A.L.R. p. 1338 and A.L.R. Blue Book Supplemental Decisions for annotation.) We conclude, under the theory applied in Cullen, supra, that, should appellant exercise its option to purchase the entire leased land, it is entitled to an offset on the purchase price equal to the amount of the condemnation award received by respondents.
 The judgment is modified to read as follows:
 "Appellant, Cinmark Investment Company, in the event it should exercise its option to purchase all of the leased land under the lease and option agreement of November 5, 1958, is entitled to subtract from the stated purchase price of $210,000, the condemnation award of $10,339 received by respondents, Donald and Alta Reichard."
 As so modified, the judgment is affirmed.
 Files, P. J., and Kingsley, J., concurred. *504
