
98 B.R. 29 (1989)
In re VISTA MEDICAL INVESTORS, LTD., a California limited partnership, Debtor.
TRI-CITY MEDICAL-SURGICAL PARK ASSOCIATION, a California nonprofit mutual benefit corporation, William F. Maloney, Joel M. Heiser, Susan M. Heiser, Frank E. Corona, Mary Kathleen Corona, Martin M. Nielsen, Loren Susan Nielsen, Cairo A. Salvatierra, Regg V. Antle, Annette J. Antle, Jon Shafquat, Marc J. Lebovits, Cathy N. Lebovits, Maurice P. Sherman, Judith M. Sherman, Robert J. Nebrosky, Sandra S. Nebrosky, Deborah Young, Bernard Marcus, Lee T. Nordan, First Federal Savings and Loan, a federally chartered savings association, Plaintiffs,
v.
Penelope H. BURCH, Vista Medical Investors, Ltd., a limited partnership, John P. Landry, James L. Mann, John P. O'Meara and Ronald Sutter, Trustee for Debtor, Defendants.
Adv. No. C87-0766-H11, Bankruptcy No. 84-02331-H11.
United States Bankruptcy Court, S.D. California.
March 13, 1989.
*30 Schall, Boudreau & Gore, San Diego, Cal., for Tri-City Medical-Surgical.
Procopio, Cory, Hargreaves & Savitch, San Diego, Cal., for Burch.
Page, Tucker & Brooks, San Diego, Cal., for trustee, Sutter.
JOHN J. HARGROVE, Bankruptcy Judge.
At issue is whether sublessees to a ground lease are in sufficient privity of contract with the original ground lessor to be entitled to an award of attorneys' fees and costs from the ground lessor as prevailing parties in an action for declaratory judgment, or whether sublessees are entitled only to an award of fees from the sublessor.
Plaintiffs claim that the ground lease provides that the prevailing party is entitled to its reasonable costs and attorney's fees should an attorney be engaged to bring suit concerning matters in the lease. Each condominium sublease contains a similar clause. Plaintiffs argue that since the ground lessor had to accept and approve each and every sublease and that since there was a mutuality of remedies, sufficient privity of contract exists, making the attorney fee clause operative to the sublessees.
The ground lessor argues that since plaintiffs were not signatories to the ground lease, they are not entitled to their attorney's fees and costs.
This court has jurisdiction to hear this matter pursuant to 28 U.S.C. § 1334 and § 157 and General Order No. 312-D of the United States District Court, Southern District of California. This is a core proceeding pursuant to 28 U.S.C. § 157(b)(2)(A) and (O).

FACTS
Plaintiffs are owners of commercial condominium units located at 2023 West Vista Way, Vista, California. By virtue of their ownership of the units, each of the owners is a member of plaintiff Tri-City Medical Surgical Park Association ("Association"). The plaintiff owners are parties to a contractual agreement with the debtor concerning the condominium units.
Defendant Vista Medical Investors ("VMI") is the debtor in this case. Defendant Penelope H. Burch ("Burch"), and defendants John P. Landry ("Landry"), James L. Mann ("Mann"), and John P. *31 O'Meara ("O'Meara") all have an interest in the contractual agreements between the plaintiff owners and debtor.
Defendant Burch is the owner of certain real property located at 2023 West Vista Way, Vista, California. On March 20, 1982, Burch, as lessor, entered into a ground lease regarding the unimproved real property with defendants Landry, Mann, O'Meara and VMI as lessee. Defendant Ronald J. Sutter, trustee, acquired rights in the ground lease when VMI subsequently filed for Chapter 11 protection.
Lessee constructed and now owns a professional office building of approximately 30,000 square feet, while Burch continues to possess the ownership rights to the land itself. The term of the ground lease is for a period of sixty years with one option available to the lessee for an extension of the lease period an additional twenty years. At the conclusion of the lease, ownership of all improvements on the real property are to vest in Burch.
The medical office building which was constructed by lessee is now known as the Tri-City Medical-Surgical Park ("TriCity"). Tri-City is divided into office suite condominiums, some of which are currently occupied by the plaintiffs pursuant to condominium sublease agreements with the lessee. The rental payment for each office suite is determined by separate documents entitled Condominium Grant Deed and Acceptance of Leasehold Interest wherein the base monthly lease amount is set forth in said document. The base rental amount in each grant deed was applicable until May 1, 1986, at which time the rent became subject to annual adjustments pursuant to the provisions in the condominium sublease, which is tied in to the ground lease.
Under the ground lease, the monthly lease payment was fixed at $4,000 during the first two years, $4,400 during the third year and $8,000 during the fourth year. Beginning in May, 1986, the amount of the monthly lease payment became subject to an adjustment formula as set forth in the ground lease. This same formula is utilized in the subleases.
In May 1986, a dispute arose regarding the interpretation of the phrase "initial minimum annual net rent" in relation to the amount which is to be multiplied by the current/base CPI ratio each year to determine the rental increase. Burch contended that the initial net rent to which the current/base CPI ratio is applied should be compounded each year rather than remain constant at the original amount. Plaintiffs and the trustee disagreed, contending that the base amount should always remains constant, which amount is then multiplied by the variable current/base CPI ratio. Plaintiffs filed their complaint for declaratory judgment on November 20, 1987. Plaintiffs sought a declaratory judgment that plaintiffs' interpretation of the disputed provision in the condominium sublease is correct and that the annual adjustment of rent is to be computed by multiplying the fluctuating adjustment percentage by the initial rent amount.
Defendant Landry filed his answer December 18, 1987. Defendant trustee Sutter filed his answer December 21, 1987. The trustee also filed his cross-complaint and counter-claim against plaintiffs and against defendants Burch, Landry, O'Meara and Mann. Burch filed her answer to the complaint and to the cross-complaint and counter-claim of trustee on December 28, 1987. Further, Burch filed her counter-claim against trustee Sutter. Trustee filed his answer to the counter-claim of Burch on January 11, 1988. Landry filed his answer to the cross-complaint of Sutter on January 27, 1988. Plaintiff Tri-City Medical Surgical Park filed its answer to the counterclaim of trustee Sutter on February 1, 1988.
On September 16, 1988, plaintiffs and counter-defendants Tri-City Medical Surgical Park Association and trustee, Ronald J. Sutter, filed their motion for summary judgment or, in the alternative, for summary adjudication of issues not in dispute. Movants sought declaratory judgment be entered in favor of plaintiffs and trustee and further that movant should be entitled to full recovery of their attorneys' fees and costs incurred in the action.
*32 At the hearing on November 14, 1988, the court ruled that the ground lease terms were clear and unambiguous on their face and that it was not the intent of the parties to provide for the compounding of the monthly rent with regards to the cost of living increases. Burch had contended that the current/base CPI ratio should be multiplied against the initial rental amount only in the first annual adjustment and that in subsequent annual adjustments the current base CPI ratio should be multiplied by the rent due in each year immediately preceding the current adjustment, thereby giving rise to a compounding effect. The court concluded that this was not a reasonable interpretation of the contract and therefore the only reasonable interpretation was that of the sublessees and that therefore the contract was not ambiguous and summary judgment was proper in favor of the movant sublessees and the Chapter 11 trustee. On the issue of attorney fees, Burch conceded that the trustee was entitled to reasonable attorney's fees. The court took under submission the issue of whether the plaintiff sublessees are entitled to an award of attorney's fees.

DISCUSSION
"When a bankruptcy court adjudicates a contract claim in connection with a petition in bankruptcy, the court applies state law to the contract dispute unless the bankruptcy code provides otherwise. [cite omitted] Moreover, the court should apply state law not merely in determining whether a breach of contract occurred, but also in deciding whether to award attorneys' fees on the claim." Matter of Sparkman, 703 F.2d 1097, 1099 (9th Cir.1983).
It is well established that unless authorized by either statute or agreement, attorney's fees generally are not recoverable as costs. California Code of Civil Procedure § 1021; D'Amico v. Board of Medical Examiners, 11 Cal.3d 1, 25, 520 P.2d 10, 112 Cal.Rptr. 786 (1974).
The version of California Civil Code § 1717(a) in effect at the time of execution of the agreements, provides in relevant part that:
In any action on a contract, where the contract specifically provides that attorney's fees and costs, which are incurred to enforce the provisions of that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the prevailing party, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to costs and necessary disbursements. (Stats.1983, c. 1073, § 1).
The sole purpose of § 1717 is to transform a unilateral contract right to attorney's fees into a reciprocal provision giving the right to recover fees to whichever party prevails. Associated Convalescent Enterprises v. Carl Marks & Co., Inc., 33 Cal.App.3d 116, 120, 108 Cal.Rptr. 782 (1973). In relying on § 1717, a prevailing party cannot totally ignore concerns with privity of contract or with the identity of the contract being enforced, this section does not create any independent right to attorney's fees.
There is no lack of reciprocity in the attorney fee provision of Article 15.02 of the Ground Lease, which states:
[s]hould either party employ an attorney in connection with a violation of the terms of this agreement, or for the preparation and serving of notice or other matters relating to this agreement, and if suit is filed, the prevailing party who employs such attorney shall be entitled to reasonable costs and attorney's fees in addition to all other amounts as provided for in this agreement.
The issue then can be presented as whether plaintiffs, as sublessee non-signatories to the Ground Lease, are entitled to attorney's fees against a signatory defendant.
Privity.
It is clear that "[a]s between the original lessor and the sublessee there is no privity of contract or estate, and therefore the sublessee does not acquire, as a general rule, by virtue of the sublease merely, any right to enforce the covenants or agreements of the lessor contained in the *33 original lease." Handleman v. Pickerill, 84 Cal.App. 214, 218, 257 P. 890 (1927). Where the transfer is an assignment, the transferee comes into privity of estate with the original lessor. Reed v. South Shore Foods, Inc., 229 Cal.App.2d 705, 40 Cal. Rptr. 575 (1964).
An agreement may be deemed an assignment even though labeled a sublease. Williams v. Hinckley, 109 Cal.App. 574, 293 P. 644 (1930). By an assignment, the lessee transfers all of its title and interests in the leasehold estate and retains no reversionary interest or right of reentry. Flynn v. Mikelian, 208 Cal.App.2d 305, 310, 25 Cal.Rptr. 138 (1962). An assignment which transfers the entire interest in demised premises, or a part thereof, for the unexpired term of the original lease thereby parting with all of the reversionary estate of the property is distinguishable from a sublease which contemplates the retention of a reversion by the lessee.
The "Condominium Sublease" proports to transfer the entire balance of the term of the lessee in a part of the leased premises as well as any extension of term thereof. However, where the lessee reserves a right of reentry for breach of conditions, the transfer constitutes a sublease rather than an assignment as a lessee retains a "contingent reversionary interest." Hartman Ranch Co. v. Associated Oil Co., 10 Cal.2d 232, 73 P.2d 1163 (1937). Article 18.1 of the "Condominium Sublease" allows the lessee upon default in the faithful performance of any agreement or condition to enter upon and repossess the property. The agreement is properly classified a sublease, and as such no privity exists unless the lessor has expressly agreed to the subleases.
Third-Party Beneficiary.
Where either the lessor expressly agrees to the sublease, or the sublessee assumes the obligations of the lease, the contract principle of third party beneficiary applies. See 4 Witkin, Summary of California Law (9th ed. 1987) Real Property § 640 p. 826 and 1 Witkin, Summary of California Law (9th ed. 1987) Contracts § 663 p. 602.
In Marchese v. Standard Realty and Dev. Co., 74 Cal.App.3d 142, 147, 141 Cal. Rptr. 370 (1977) it was held that if a lessor has expressly agreed to a sublease, the sublessee is a third party beneficiary and has a right to proceed directly against the lessor to enforce the implied covenant of quiet enjoyment. The court determined that where the lease itself contained a provision that the property may be sublet to a named party, it follows that the sublessee is the beneficiary of the lessor's promise to allow the sublessee to occupy the property. It does not appear that this rule has been specifically extended to allow a sublessee to enforce an attorney fee provision such as the one in the case at bar.
Article 11.04 of the Ground Lease executed by Burch, the lessor, and Vista Medical Investors grants to lessee an unconditional right to sublease all or part of the premises provided each sublease contains a provision satisfactory to lessor, requiring sublessee to attorn to lessor, and provided three other minor provisions were satisfied. Further, Burch executed consent forms which clearly indicate her agreement to the subleases. Accordingly, this court concludes that Plaintiffs may be entitled to enforce the attorney fee provision of Article 15.02 of the Ground Lease if found to be third party beneficiaries of the Ground Lease.
Civil Code § 1559 codifies the rule relating to third party beneficiaries and reads as follows: "A contract, made expressly for the benefit of a third person, may be enforced by him at any time before the parties thereto rescind it." Persons who are only incidentally or remotely benefited by the contract are excluded from enforcement by this section. Lucas v. Hamm, 56 Cal.2d 583, 590, 364 P.2d 685, 15 Cal.Rptr. 821 (1961). It is not necessary that the contract identify or refer to the third party by name. It is sufficient if the third party can show that it is one of a class of persons for whose benefit the contract was made. Steve Schmidt & Co. v. Berry, 183 Cal. App.3d 1299, 1313, 228 Cal.Rptr. 689 (1986). Nor is it required that the contract be exclusively for the benefit of the third party. *34 Montgomery v. Dorn, 25 Cal.App. 666, 145 P. 148 (1914).
It is clear that subleases were contemplated by the parties when the Ground Lease was executed. Further, Article 11.04.01 of the Amendment to Ground Lease executed by Burch October 1, 1982, provides that early termination of the Ground Lease "shall not terminate nor affect the validity of any such then existing sublease" and that upon premature termination, the lessor "shall thereafter be subject to the same extent LESSEE as sublessor was subject to all the terms, covenants, and conditions of each such sublease and shall have all the rights that LESSEE as sublessor had under each such sublease. . . ." Burch executed numerous forms of Acceptance and Consent of Ground Lessor to the subleases, executed Certificates of Ground Lessor, and executed Estoppel Certificates of Ground Lessor, indicating an intent not to interfere with the subleases if the Ground Lease terminated prematurely.[1] As a result of this interrelationship, Burch's position regarding the interpretation of the CPI increase clause contained in the conforming Ground Lease/sublease agreements had a direct impact upon sublessor's ability to comply with the terms of the sublease by making it difficult to refinance or sell the subleases during the dispute due to the uncertainty of what amount of rent would actually be due.
A sufficient nexus exists between the lessor and sublessees, as evidenced by the numerous documents executed by Burch, which entitle plaintiffs to enforce the attorney fee provision of the Ground Lease as third party beneficiaries and prevailing parties in an action relating to the agreement. As third party beneficiaries, the attorney fees can be recovered by operation of the contract.
In the recent decision Wilson's Heating & Air Conditioning v. Wells Fargo Bank, 202 Cal.App.3d 1326, 249 Cal.Rptr. 553 (1988) the court provides an excellent analysis of the development of § 1717 to encompass non-signatories to contracts. While stating that mere consent as a condition precedent to the existence of a subcontract does not operate to make the consentor a party to the subcontracts or in privity with a party, the court agreed that third party beneficiaries may recover attorney fees as a prevailing party. What began as a means of transforming a unilateral contract right to attorney fees into a reciprocal provision has been enlarged to permit one not a party to a contract to nevertheless recover fees when actually sued on the contract if it provided for attorney's fees. Wilson's Heating, at 1333, 249 Cal.Rptr. 553. The provision has further been enlarged to permit a non-signatory plaintiff suing as a third party beneficiary seeking to enforce a contract against a signatory defendant to recover attorney's fees if named the prevailing party. In the most recent extension of this section, a prevailing signatory defendant was permitted to recover fees against a non-signatory plaintiff but only where the defendant can show it actually would have been liable for fees had it not prevailed.
It is interesting to note that Burch in her answer to plaintiffs' complaint prays for an award of her reasonable attorney's fees if prevailing on the complaint.

CONCLUSION
Plaintiffs are entitled to recover from defendant Burch their reasonable costs and attorneys' fee incurred in connection with this action. Plaintiffs shall file and serve and set for hearing their application for fees.
This Memorandum Decision constitutes findings of fact and conclusions of law pursuant to Bankr.R. 7052. Counsel for the plaintiffs is directed to file with this court an Order in conformance with this Memorandum Decision within ten (10) days from the date of entry hereof.
NOTES
[1]  Declarations in support of the motion for summary judgment which set forth the documents executed by Burch indicating her consent to the subleases were filed by Regg V. Antle, Joel M. Heiser, Mark J. Leborits, William F. Maloney, Robert J. Neborsky, Martin M. Nielsen, Jon Shafqat, Maurice P. Sherman, and Deborah R. Young.
