Plaintiff-appellant Harborside Refrigerated Services, Inc., (“Harborside”) appeals from a judgment of the United States District Court for the Southern District of New York (Kevin Thomas Duffy, Judge), entered March 20, 1991, granting defendants-appellees Howard Vogel and Edward Benenson’s (“Vogel and Benenson”) motion for summary judgment and dismissing Harborside’s complaint. We hold that the district court erred in denying Harborside relief pursuant to an option agreement betweеn the parties, and accordingly reverse.
BACKGROUND
The current dispute arose out of a business arrangement between Uiterwyk Cold Storage Corporation (“UCS”), predecessor in interest to Harborside Refrigerated Services, Inc., and Edward Stephen of Tampa, Inc. (“EST”), predecessor in interest to Vo-gel and Benenson. In 1972, the Tampa Port Authority of Hillsborough County, Florida (“TPA”), approved UCS’ application to build a cold storage warеhouse (“the warehouse”) in the Port of Tampa. To facilitate this project, UCS enlisted EST who entered into a ground lease with TPA. UCS then entered into an occupancy lease with EST, obtained a construction loan and built the warehouse. EST later obtained a permanent loan from the John Hancock Mutual Insurance Company and executed a promissory note in John Hancock’s favor. The promissory note was secured by the first mortgage lien against EST’s leasehold interest (the “Hancock mortgage”). At the time of the current dispute, Harborside was making monthly payments under the occupancy lease to Vogel and Benenson, of which Vogel and Benenson paid $22,717.52 per month to TPA under the ground lease, and kept $4,899.15 as a monthly profit.
UCS and EST also executed two agreements giving UCS the option to purchase EST’s ground leasehold in the TPA property. This cаse concerns the second of these, dated July 25, 1989, which superseded the first and was entitled the Amended Option Agreement (the “Agreement”). The Agreement granted UCS the right to exercise its option during two one-year periods: (1) during the year beginning July 25,1987, UCS had the right to purchase the leasehold at a price of $2,115,000.00; and (2) during the year beginning July 25, 1990, it could acquire the leasehold for $1,835,-000.00. The Agreement required that, in order to exercise its option, UCS provide written notice to EST and fix a closing date for between thirty and ninety days after delivery of notice. It further gave UCS the choice either of paying the full purchase price in cash, or of assuming the Hancock mortgage and paying the difference between the purchase price and the principal balance due on the mortgage with ten percent of this cash difference due at the time of exercise.
On July 25, 1987, Harborside provided Vogel and Benenson notice of its intention to exercise its option and to close on August 27, 1987. Harborside elected to assume the Hancock mortgage, which on the closing date had an outstanding balance of $1,900,922.70, and to pay Vogel and Benen-son only the cash difference of $214,077.30. *370 It enclosed on option deposit of ten percent, or $21,407.73. By letter dated August 3, 1987, however, Vogel and Benenson returned the chеck and rejected the attempted exercise of the option. Vogel and Be-nenson argued that certain language in the agreement established the purchase price at fair market value, not the fixed sum of $2,115,000.00.
On July 30, 1987, Vogel and Benenson filed a complaint in the district court seeking a declaratory judgment as to the correct purchase price of the leasehold. Vogel and Benenson asserted that the рarties specified a set price only to satisfy the demands of the Hancock lenders and never intended it to be binding. Harborside moved for summary judgment declaring that the option exercise price was the fixed price stated in the Agreement. By order dated January 3, 1989, the district court granted defendant Harborside’s motion for summary judgment and on January 23, 1989 entered judgment declaring that
the defendant has the right under paragraph 2 of the Amended Option Agreement to exercise an option to acquire plaintiffs’ long-term leasehold for $2,115,000, which option was timely and properly exercised in writing by defendant Harborside by letter dated July 25, 1987.
Vogel and Benenson filed their notice of appeal of this Judgment on February 17, 1989 but, on April 14, 1989, notified Har-borside that they were unilaterally withdrawing the appeal.
On June 29, 1989, Harborside again noticed its intent to exercise the option with a closing date this time of August 17, 1989. As before, Harborside elected to assume the Hancock mortgage and to pay only the $214,077.30 cash difference between the now-established purchase price of $2,115,-000.00, and the $1,900,922.70 balance due on the mortgage at the time of the originally scheduled, August 27, 1987, closing. Harborside deducted from the purchase price $4,899.15 for each month from August 27, 1987, to August 17, 1989 representing the profit margin by which its lease payments to Vogel and Benenson exceeded the latter’s mortgage payments, on the theory that if the transaction had closed on August 27, 1987 Harborside would have paid the mortgage payments directly and no profit would have been earned. Accordingly, Harborside tendered a check for $9,649.77, ten percent of the newly calculated cash difference of $96,497.70. Vogel and Benenson, by letter dated July 19, 1989, again rejected Harborside’s attempt to exercise the option and returned the check.
This time, Harborside brought suit in the district court. Its complaint, dated May 4, 1990, requested a declaration that: (1) The June 29,1989 option exercise was in compliance with the Agreement and with the district court’s prior judgment; (2) The mortgage’s principle balance, for the purpose of calculating the cash payment, was as it stood on August 27, 1987, the original closing date; (3) Harborside received crеdit for its payments on the lease in excess of what it would have paid on the mortgage if the transaction had closed on August 27, 1987. In October 1989, Harborside moved for summary judgment.
Vogel and Benenson cross-moved for summary judgment dismissing the complaint, contending that “Harborside cannot possibly assume a mortgage balance that has not existed since August 27, 1987.” The cash amount, they argued, should be calculated using the mortgage balance at its then-рresent level of $1,594,991.28, leading to a cash payment of $520,008.72. Moreover, they asserted their right to retain the profits earned over the full length of the leasing arrangement. Finally, Vogel and Benenson claimed that Harborside, who would have to satisfy $850,000 in ad valorem real estate taxes assessed against the property, might not be in a position to close the transaction because it might not qualify to assume the mortgage under John Hancock’s application process.
In an order filed March 8, 1991, the district court granted Vogel and Benenson’s motion for summary judgment and dismissed Harborside’s complaint. The district court credited Vogel and Benenson with the mortgage payments from August *371 1987 to August 1989, holding that Harbor-side should not benefit from the mortgage payments since the mortgage had been “amortized by its [i.e. Harborside’s] own terms.” The court concluded that “I am not prepared to fashion a remedy that permits Harborside to assume a mortgage as it existed more than three years ago.” The district court then concluded that Harbor-side’s delay until June 29, 1989, following its January 3, 1989 order, to re-notice its intent to exercise the option foreclosed it from pursuing the transaction. While acknowledging that its order had provided that “thé sale could close with August 27, 1987 terms,” the court ruled that Harbor-side “took a risk by not setting a closing date until more than six months after” that order, and had thereby given up its rights to these terms. Any other reading of its January 3, 1989 ruling, it held, would be “inequitable,” since “[m]y January 3, 1989 order .:. cannot be construed to last beyond the point that the deal would be efficacious only for Harborside.” The district court also relied on Vogel and Benenson’s assertion that Harborside might not meet the requirements of John Hancock’s formal application process, surmising that “Har-borsidе may not be in a position to assume the Hancock mortgage.” The district court concluded that “Harborside has lost its rights in the Hancock mortgage and is no longer entitled to assume a mortgage with a balance that is no longer pertinent at bar.” Judgment was entered on March 20, 1991.
On April 1, 1991, Harborside served by mail a Motion to Alter or Amend the Judgment pursuant to Rule 59. The affidavit in support of the motion alleged that the district court had mistakenly: (a) fоund that Harborside had sat on its rights “for more than six months,” without acknowledging that its delay was due in substantial part to Vogel and Benenson’s appeal of the January 23, 1989 judgment; (b) found that the “Hancock Mortgage has been reduced by Vogel/Benenson through mandatory monthly amortization payments,” without acknowledging that the cash for these payments had come from Harborside’s lease payments; (c) found that Harborside needed approval of the mortgagee to assume the mortgage, when in fact this was not required; and (d) omitted certain language from the judgment not material to this appeal and failed to make clear that his order did not affect Harborside’s second option to purchase the leasehold during the year commencing July 25, 1990. Harbor-side requested that the district court either enter summary judgment in its favor, or alternatively strike the language referring to Harborside’s having “lost its rights in the Hancock Mortgage.”
On July 22, 1991, the district court denied the requested relief on the grounds that the arguments presented were “an attempt to reargue the summary judgment motion in this case”, except that the court agreed to clarify that its judgment did “not in any way affect [Harborside’s second option] since it was never a part of any lawsuit before me.”
Harborside appeals the March 20, 1991 judgment.
DISCUSSION
I. Timeliness of Harborside’s Appeal.
At the outset we consider the timeliness of Harborside’s appeаl. If the appeal is untimely, the defect is jurisdictional and the appeal must be dismissed.
See West v. Keve,
Under Rule 4(a) of the Federal Rules of Appellate Procedure, notice of appeal “shall be filed with the clerk of the district court within 30 days after the date of entry of the judgment or order appealed from.” Fed.R.App.P. 4(a)(1). The timely filing of certain enumerated motions, including a motion to alter or amend the judgment pursuant to Rule 59(e) of the Federal Rules of Civil Procedure, delays the running of the 30-day period until entry of the order granting or denying such motion. Fed. R.App.P. 4(a)(4). Harborside filed its notice of appeal on August 15, 1991, well more than 30 days after the district court’s March 20, 1991 judgment. It argues, however, that its April 1, 1991 motion to alter or amend the judgment delayed the 30-day period until the district court’s July 22, *372 1991 endorsement disposing of that motion, and that its notice of appeal was timely filed 24 days thereаfter. Vogel and Benen-son contend that Harborside’s April 1 motion was, in substance, a motion for reargument which should have been filed “within 10 (ten) days after the docketing of the court’s determination of the original motion,” here the court’s March 8, 1991 endorsement. See Rules of the U.S.Dist.Cts. for Southern Dist. of N.Y., Civil Rule 3(j). They argue that the motion was untimely and, under Rule 4(a)(4), cannot suspend the running of the 30-day period.
We have held that, for the purposes of determining apрellate jurisdiction, a motion which calls into question the correctness of a district court judgment is the functional equivalent of a Rule 59(e) motion, and should be treated as such.
See City of Hartford v. Chase,
II. Res Judicata Does Not Bar Harbor-side’s Claim.
Vogel and Benenson assert that, since Harborside could have raised its current claims as counterclaims to Vogel and Be-nenson’s initial suit for declaratory rеlief, the doctrine of res judicata bars Harbor-side’s current action.
The doctrine of res judicata provides that
when a court of competent jurisdiction has entered a final judgment on the merits of a cause of action, the parties to the suit and their privies are thereafter bound ‘not only as to every matter which was offered and received to sustain or defeat the claim or demand, but as to any other admissible matter which might have been offered for that purрose.’ Commissioner v. Sunnen,333 U.S. 591 , 597 [68 S.Ct. 715 , 719,92 L.Ed. 898 ] (1948) (quoting Cromwell v. County of Sac,94 U.S. 351 , 352 [24 L.Ed. 195 ] (1876)) (emphasis added).
Res judicata thus not only bars parties from relitigating the same cause of action, but also “prevents litigation of a matter that could have been raised and decided in a previous suit, whether or not it was raised.”
Murphy v. Gallagher,
Many jurisdictions recognize an exception to ordinary res judicata principles where, as here, the prior action involved only a request for declaratory relief. Under this exception, the preclusive effect of the declaratory judgment is limited to the subject matter of the declaratory relief sought. The plaintiff or defendant may continue to pursue further declaratory or coercive relief.
See
Restatement (Second) of Judgments § 33, Comment c (1982);
Horn & Hardart Co. v. National Rail Passenger Corporation,
*373
In deciding whether this declaratory judgment exception applies here, a legitimate concern would be whether federal or New York State law governs the preclusive effect of the judgment оf a federal court sitting in diversity on another federal diversity action. While we have suggested that “federal law should determine the preclu-sive effect of a federal judgment,”
Gelb v. Royal Globe Insurance Co.,
Policy considerations underlying both res judicata and the availability of declaratory relief also support our application of the declaratory judgment exception. A common purpose behind both declaratory judgment availability and the doctrine of res judicata is litigation reduction and the conservation of judicial resources. Declaratory relief enables federal courts to clarify the legal relationships of parties before they have been disturbed thereby tending towards avoidance of full-blown litigation.
See Travelers Insurance Co. v. Davis,
Moreover, even if res judicata could be fully applied, we doubt whether the circumstances of this case would warrant its application. Yogel and Benenson’s action for declaratory relief focused solely on the pricing issue. Thеy in no way challenged Harborside’s handling of the transaction’s other terms. As the district court stated in its January 3, 1989 Endorsement: “[i]t is uncontroverted that Harborside sought to exercise the option and fulfilled the contractual prerequisites to such exercise, including tendering the amount required by the writing” (emphasis added). Thus, at the time of Yogel and Benenson’s complaint, Harborside had no reason to believe that any disagreement beyond price existed. Harborsidе cannot be faulted for failing to counterclaim as to issues not then in dispute.
We therefore hold that Vogel and Benen-son’s prior action for declaratory relief does not, under the doctrine of res judicata, bar Harborside’s subsequent action.
III. Harborside’s Claim Is Meritorious.
We finally turn to the merits of the district court’s dismissal of Harborside’s complaint. To recapitulate, the district court ruled that by June, 1989 when Harborside re-noticed its exercise of the July 1987 oрtion, the August 27,1987 mortgage balance was no longer relevant for calculating the *374 proper cash payment, and further held that by delaying its exercise of the option until June Harborside had forfeited any right to the August 27, 1987 mortgage balance established by the court’s January 1989 decision. We find error in both rulings.
The Agreement provided that, during the year beginning on July 25, 1987, Harborside could provide notice of its intent to exercise the option and set a closing date thirty to ninety days thereafter. When Harborside exercised the option with the closing to occur on August 27, 1987, Vogel and Benenson’s refusal to close on the August 27, 1987 terms was a breach of the Agreement. At that point Harborside became entitled to the benefit of its bargain as of August 27, 1987,
not
to some other option to purchase under terms as they would stand two or three years later depending on when litigation was resolved. It is a fundamental premise of contract law that in remedying a breach “the general purpose of the law is, and should be, to give compensation, that is, to put the plaintiff in
as good a position as he would have been in had the defendant kept his contract.”
S. Williston, Williston on Contracts § 1338 (emphasis added);
Hetzel v. Baltimore & Ohio R.R. Co.,
The district court also erred in ruling that Harbоrside had forfeited its right to the August 27,1987 terms by its delay in re-noticing its intent to close. Some concern about Harborside’s delay is not unfounded. Harborside did not have a right to simply put in its pocket the January 3, 1991 Endorsement permitting “the sale to close with August 27, 1987 terms”, and then to sit back and evaluate the fluctuations of the real estate market to see whether it would yield terms even more advantageous, all the while secure in the expectation thаt it could close on the August 27, 1987 terms. However, we believe that Harborside’s delay, when carefully examined, was neither substantial nor obviously motivated by such bad faith. The district court ruled in Harborside’s favor on January 3, 1989 and Harborside noticed the exercise of its 1987 option on June 29, 1989. Vogel and Benenson, however, had appealed the January 3 ruling and did not notify Harborside that they were withdrawing the appeal until April 14, 1989. Any claim by Vogel and Benensоn that Harborside was remiss in not seeking to close the transaction while the former’s appeal was pending is disingenuous. Harborside acted reasonably in not disturbing the status quo pending the litigation’s final outcome. It re-noticed its intent to exercise the option little more than two months thereafter. This delay was not so substantial as to evidence bad faith or justify the forfeiture of Harborside’s contractual rights. We believe that the district court erred in holding that Harborside’s delay foreclosed it from asserting its rights under the first judgment.
We therefore hold that Harborside is entitled to the exercise of its option according to the terms as they stood on August 27, 1987. Harborside is entitled to assume the Hancock mortgage with a balance of $1,900,922.70, and pay to Vogel and Benen-son a net purchase price consisting of the cash difference between this amount and the purchase priсe of $2,115,000.00, plus *375 interest as of August 27, 1987 on this cash amount. Harborside is entitled to offset from the net purchase price Vogel and Be-nenson’s monthly profits of $4,899.15 beginning with the month of September, 1987 and including each subsequent month in which Harborside has made a lease payment to Vogel and Benenson which contained this profit margin, plus interest. If this latter amount exceeds the net purchase price plus interest, then a judgment for the difference must be entered in Harborside’s favor.
CONCLUSION
We remand to the district court to finally determine the amount due at the closing. The judgment of the district court is reversed.
