
732 P.2d 184 (1987)
CITY OF KENAI, Appellant and Cross-Appellee,
v.
Edward A. FERGUSON, Appellee and Cross-Appellant.
Nos. S-1435, S-1478.
Supreme Court of Alaska.
February 6, 1987.
*185 Timothy J. Rogers, City Atty., Kenai, for appellant and cross-appellee.
C.R. Baldwin, Kenai, for appellee and cross-appellant.
Before RABINOWITZ, C.J., and BURKE, MATTHEWS, COMPTON and MOORE, JJ.

OPINION
RABINOWITZ, Chief Justice.
This case arose out of a dispute over a provision in a fifty-five year lease entered into by the City of Kenai and Edward A. Ferguson. The provision was an agreement to agree to future rental terms at five-year intervals. The core of the dispute here is whether such a provision is valid and, if so, what standard should be used to determine the rental. Also at issue in this appeal are the superior court's rulings permitting withdrawal of admissions, awarding of attorney's fees, and continuing jurisdiction over the case.

I. BACKGROUND.
In May 1970, Edward A. Ferguson (Ferguson) bid for the right to lease Tract G2, Airport Lands, Gusty Subdivision, Lots 1, 2, 3, from the City of Kenai (City). Ferguson was the sole bidder. His bid was accepted by the City and a lease agreement with the City was signed by Ferguson and his partner in August 1970. The lease has a fifty-five year term. Through a series of assignments Ferguson became the sole lessee of Lot 1 of the Gusty Subdivision, and the City remains the lessor. Paragraph 10 of the lease agreement is the subject of the instant dispute:
10. Rent Escalation: Every Five Years or Less: In the event this lease is for a term in excess of five years, the amount of rents or fees specified herein shall be subject to re-negotiation for increase or decrease at intervals of EVERY FIVE YEARS from the 1st day of July preceding the effective date of this lease.
[Emphasis in original.]
Subsequent to entering into the lease Ferguson built a service station on Lot 1 with knowledge of the City. In May 1980, the City sent Ferguson a letter and asked him to sign an "Amendment to Lease" (amendment) which would have increased his rent from $1,140.80 to $7,017.00. This was purportedly done under paragraph 10. The amount of the new rent was determined by applying a formula adopted by City ordinance. The formula called for a six percent return on the appraised value of Airport Lands. The letter asking Ferguson to sign the amendment termed the new rental rate as "the rate we are proposing for the period July 1, 1980 through June 30, 1985." It then requested Ferguson to:
"Please execute and notarize the enclosed `Amendment to Lease' and return it to this office... . You will be receiving an adjusted billing at a later date."
*186 Over the next two years the City and Ferguson communicated but failed to resolve the rent renewal issue.[1] The City then contacted Ferguson's counsel and advised him that renegotiation of the lease was more than three years overdue, and that unless Ferguson paid the amount due according to the City's appraisal (including retroactive payment to 1980) within 30 days, the City would proceed to terminate the lease and collect all sums due. Ferguson responded that he was willing to negotiate the rental rate but was not willing to accept a rate dictated by City appraisal and formula.
The City then filed suit seeking forfeiture and termination of the lease, possession of the property, all rents due, costs and attorney's fees. Ferguson denied the City's right to relief and counterclaimed that the City breached its covenant of quiet possession, that paragraph 10 of the lease either was invalid or did not give the City the right to demand additional rent without Ferguson's concurrence, and that Ferguson was entitled to a declaration of rights to that effect.
The parties filed cross-motions for summary judgment, and the superior court ruled in favor of Ferguson. The court dismissed the City's claim for rent based upon the "alleged" negotiation of the rent under paragraph 10. The court interpreted paragraph 10 to mean that either party could negotiate for the rental amount for any five-year period beginning July 1, 1985. If the parties could not agree, either party could seek a judicial determination of the "fair rental rate;" the rent would remain at $1,140.80 until a new rate was established under paragraph 10. The court further interpreted paragraph 10 as permitting but not mandating renegotiation of the rent every five years. If one party sought negotiations, then the other party was obligated to negotiate in good faith. In fixing a fair rental rate, the court directed the parties to another provision of the lease for factors to consider in adjusting the rent, and found simply arriving at the appraised highest and best use value was not contemplated under paragraph 10.
This appeal and cross-appeal followed.

II. THE SUPERIOR COURT'S GRANT OF FERGUSON'S CROSS-MOTION FOR SUMMARY JUDGMENT AND DISMISSAL OF THE CITY'S COMPLAINT.

A. Enforceability of Paragraph 10 of the Lease.

The superior court concluded that paragraph 10 is enforceable as a matter of law and that a fair rental value should be implied as the rental for the five-year periods for which the parties are unable to negotiate an agreement. The validity of the superior court's summary judgment decision turns on this conclusion of law.[2] We sustain *187 the superior court's holding that paragraph 10 is enforceable.
Good faith is a term implied in every contract.[3] In this context, good faith requires the parties to attempt to reach agreement as to rent for the property for the five-year period in question. Forcing Ferguson to quit the property after his substantial reliance on the fifty-five-year length of the lease would be inequitable, as would be allowing Ferguson to continue using the property without reasonably compensating the City.
The City had notice that Ferguson intended to use the property to build a filling station. Ferguson constructed a filling station on the property and subleased the station for an original term of ten years with renewal options for two successive five-year terms. Under the terms of the lease Ferguson could neither sublet the premises nor construct a filling station without the City's prior consent. He expended substantial sums in constructing the filling station. On the other hand, Ferguson should not benefit from a lease provision which he asserts is unenforceable, in order to obtain a better bargain than the parties intended when they entered into this long-term lease.
Courts are no longer reluctant to supply lease terms when parties who, at the time of contracting agreed to set or renegotiate particular terms in the future, are unable to reach agreement. This is particularly true when the amount of rental is the term left to future agreement. Chaney v. Schneider, 92 Cal. App.2d 88, 206 P.2d 669, 669 (1949). In concluding that paragraph 10 of the lease is enforceable in the factual circumstances just outlined, we find the reasoning of Chaney persuasive. Therein the court wrote in part:
[I]ntent is to be determined from a view of the instrument as a whole, and a consideration of all of the facts in the case. If the agreement to renew was the essence of the contract, and the terms of the lease or the rental to be paid thereunder were to be fixed by agreement, or in some other way, at the time of the extension of the lease, then failure of the parties to so agree, or to fix particular terms does not avoid the lease. In such a case the courts will declare the terms upon which the parties fail to agree.[4]
206 P.2d at 671. Based on this reasoning the court was willing to declare a missing rental term in order to effect the reasonable expectations of the parties, where the renewal option was "the essence of the contract." There is even greater reason to declare a rental term when, as here, parties under a long term lease are unable to reach agreement, since there are correspondingly greater reliance expectations created in the continuing use of the property.[5]
*188 Our opinion in Altman v. Alaska Truss & Mfg. Co., 677 P.2d 1215 (Alaska 1983), indicates our willingness under the proper circumstances to supply a fair market rental term and is in accord with the approach of the Chaney court.[6] In Altman, this court suggested that where a lessor had done everything possible to have the rental rate established by arbitration or appraisal, then the lessee would be obligated to pay the fair market rental value of the premises. Id. at 1224.
In this case, the "essence of the contract" is the fifty-five-year term of the lease. This is evidenced by the substantial long term investment made by the lessee in constructing the service station. It is clear that the parties contemplated that the rent over this fifty-five-year term would be adjusted to fluctuations in market conditions. Paragraph 10 provided in part that rents "shall be subject to renegotiation for increase or decrease" every five years. We therefore find no error in the superior court's decision to find paragraph 10 enforceable and to imply a reasonable fair market rent if necessary to give effect to the reasonable expectations of the parties.

B. The Standard for Determining Reasonable Fair Market Rent Under Paragraph 10 of the Lease.

In ruling on the summary judgment motions, the superior court held in part that in deciding what is a reasonable rent under paragraph 10 of the lease "[s]imply arriving at the highest and best use of the property is not contemplated... ." We hold that the court was correct in rejecting the highest and best use criterion as the applicable standard for the determination of reasonable rent under paragraph 10 and in holding that actual use of the premises is to be considered in ascertaining the fair market rental value of the premises.
Here Ferguson constructed a filling station. This improvement was required to be approved by the City under paragraph 7 of the lease. Under paragraph 4 of the lease no sublease could be entered into by Ferguson without the written consent of the City. Given that the City had notice of Ferguson's intended use at the time of leasing and consented to the construction of a service station and subleasing of the property, it is apparent that the parties contemplated that the premises would be used for the purpose of operating a gas station. Thus, we conclude that the superior court did not err in its adoption of the fair market value of equivalently used property as the standard to be employed in determining fair market rental value under paragraph 10 of the lease.[7]

C. Dismissal of the City's Complaint for Back Rent From 1980-1985.

The superior court held that the City had failed to establish the rental for 1980-1985 through exhaustion of reasonable efforts to negotiate, but rather sought to impose a new rental under a formula prescribed by a Kenai Ordinance. Our review *189 of the record persuades us that the superior court erred on this point and that the case should be remanded to the superior court for a determination of the fair market rental value of the premises for the period from July 1, 1980 to June 30, 1985.[8] In our view there is no basis in the record for concluding that any genuine issues of material fact were raised regarding whether or not the City attempted in good faith to negotiate the rent for the five years in question. After the superior court has rendered its decision regarding the applicable rent for the period July 1, 1980 through June 30, 1985, the parties should then be given a reasonable amount of time to negotiate the rent for the period running from July 1, 1985 to June 30, 1990.

III. THE SUPERIOR COURT'S RULING ALLOWING FERGUSON TO WITHDRAW ADMISSIONS DEEMED ADMITTED UNDER CIVIL RULE 36.
On November 5, 1984, the City requested twenty-four admissions from Ferguson pursuant to Alaska Rule of Civil Procedure 36. Subsequently, the City and Ferguson, through counsel, agreed orally to a thirty-day extension of time to answer the request. Ferguson failed to respond in a timely manner. Approximately four months later, the City moved for summary judgment, relying on the requests for admissions being deemed admitted because of Ferguson's failure to respond. In response Ferguson moved for an order to withdraw admissions under Civil Rule 36(b), and filed his own motion for summary judgment. Initially the superior court denied Ferguson's motion to withdraw, finding "an insufficient showing that the merits of the case would be subserved by the withdrawal of the admissions." It based its decision on Ferguson's lack of good faith assertions "demonstrating that as to each admission, the facts are different from those deemed admitted." However, the superior court gave Ferguson additional time to amend his motion and subsequently permitted the withdrawal of certain admissions.
The City argues that the court abused its discretion by allowing Ferguson to withdraw admissions four months after a deadline agreed to by the parties, by guiding Ferguson in how to get his admissions withdrawn, and by affording Ferguson a second chance to withdraw his admissions. It argues that Ferguson's original motion to withdraw lacked any suggestion of how the merits would be subserved; that the court's ruling that Ferguson made an insufficient showing that the merits would be subserved by withdrawal should have ended the inquiry; and that the admissions should have been deemed admitted. It further contends that the superior court took sides when it gave Ferguson a second chance and guided him, and that this was an abuse of discretion which requires us to disallow Ferguson's withdrawal and remand the case for a disposition on the City's motion for summary judgment.[9] We see no merit in any of the City's contentions.
*190 Under Civil Rule 36(a), admission requests are deemed admitted if the party to whom the request is addressed fails to serve a written answer or objection within 30 days. Subsection (b) of Civil Rule 36 provides in part:
[T]he court may permit withdrawal or amendment when the presentation of the merits of the action will be subserved thereby and the party who obtained the admission fails to satisfy the court that withdrawal or amendment will prejudice him in maintaining his action or defense on the merits.[10]
First, the withdrawal of admissions in the case at bar subserved the merits of the action. A party can demonstrate that withdrawal of admissions subserves the merit by showing that the admission concerns a key factual issue. Pleasant Hill Bank v. United States, 60 F.R.D. 1 (W.D. Mo. 1973).[11] Here the admissions permitted to be withdrawn went to key factual issues raised by the pleadings.[12]
Second, the City failed to demonstrate that withdrawal would prejudice it. The City had notice that many of the admitted facts were contested, the superior court authorized withdrawal prior to any trial date having been set or significant discovery having been undertaken, and it was not shown that Ferguson's counsel acted in bad faith in moving for withdrawal.[13] Therefore, the superior court properly allowed Ferguson to withdraw his admissions.
As to the City's contention that the superior court abused its discretion in allowing Ferguson a chance to amend his motion to withdraw, the record indicates no impropriety in the superior court's actions. Absent a definite and firm conviction that the judge made a mistake, we will not overturn a decision left to the discretion of the trial court. Channel Flying, Inc. v. Bernhardt, 451 P.2d 570, 572 (Alaska 1969).[14]


*191 IV. COSTS AND ATTORNEY'S FEES.

A. Civil Rule 82 Attorney's Fees.

The City contends that the superior court erred in ruling that Ferguson was the prevailing party for the purposes of awarding attorney's fees under Civil Rule 82. In light of our conclusion that the superior court erred in holding that the City was precluded from receiving increased rents for the period from July 1, 1980 to June 30, 1985, the superior court upon remand should redetermine the question of prevailing party as well as any award of attorney's fees under Civil Rule 82.

B. The Superior Court's Award to the City of Interim Attorney's Fees for its Costs in Litigating Ferguson's Withdrawal of Admissions.

The superior court awarded the City $700.00 to "compensate the City for litigating the motion to withdraw admissions." The superior court did not specify the basis for its imposition of the $700.00 in costs. Ferguson argues that this award of attorney's fees to the City was error, because the sanction for failure to timely respond to admission requests is to deem the matters admitted and that he possessed an unqualified right under Civil Rule 36(b) to move to withdraw admissions. He further argues that the superior court had no authority to assess the attorney's fees without statute or court rule and that Civil Rules 82, 37(a)(4), and 95(a) do not apply. We affirm the court's interim award of $700.00 for attorney's fees.
Under Civil Rule 36(a), a requesting party may move to determine the sufficiency of answers or objections to admissions requests. Alaska R.Civ.P. 36. If the answers are found deficient, the court may deem the matter admitted or order an amended answer be served, or in lieu of these orders, may determine that the final disposition of the request be made at a pretrial conference or at a designated time prior to trial. Id. Finally, under Civil Rule 36(a), the court may award expenses in relation to this motion as provided under Civil Rule 37(a)(4). Id. That is, "[t]he losing party on that motion will ordinarily be requested to pay his opponent the expenses incurred on the motion, including a reasonable attorney's fee." 8 C. Wright and A. Miller, Federal Practice and Procedure § 2265, at 747-48 (1970).
In the context of this record, we view the City's motion for summary judgment based on its requested admissions and its objections to Ferguson's motion to withdraw as the functional equivalent of a motion to determine the sufficiency of answers. Here the superior court in effect found Ferguson's answers insufficient when it ruled his motion to withdraw insufficient and in effect gave Ferguson an opportunity to amend his answers when it afforded him the opportunity to amend his motion to withdraw. We therefore conclude that the superior court's $700.00 attorney's fee award to the City for its litigation costs in connection with Ferguson's motion for withdrawal of admissions was authorized under Civil Rules 36(a) and 37(a)(4).[15]

V. THE SUPERIOR COURT'S ASSERTION OF CONTINUING JURISDICTION.
Ferguson and the City both agree that the court erred in retaining jurisdiction over the case. At issue is the validity of paragraphs 3(b) and 3(c) of the superior court's amended judgment of February 7, 1986. Under paragraph 3(b), either party has the option to negotiate for a change in rent for any five-year period, beginning July 1, 1985. Under paragraph 3(c): "If the parties cannot agree to a fair rental *192 rate, either party may, upon application to this [superior] court by motion, seek a judicial determination of the fair rental rate by this court which shall have continuing jurisdiction of the case until final judgment."
The superior court's retention of jurisdiction was not error. "A court has inherent power to do that which is reasonably necessary for the administration of justice." Keltner v. Curtis, 695 P.2d 1076, 1079 n. 4 (Alaska 1985). In fashioning appropriate relief in this case the superior court's retention of jurisdiction was within its inherent powers.[16]
AFFIRMED in part, REVERSED in part, and REMANDED for further proceedings consistent with this opinion.
NOTES
[1]  On June 18, 1980 the City again requested Ferguson to execute and return the amendment. Ferguson responded that he was not advised of any negotiations and found the appraisal used by the City to determine the new rental rate "completely out of reason" because it was much higher than the property's current assessment. He informed the City that he could not sign the amendment as it stood. Ferguson continued paying his rent according to the old rate.

Based on this newly calculated rental, the City informed Ferguson that his rent was delinquent and that if it remained unpaid his lease would be cancelled in May 1981. Ferguson, through counsel, responded that the City had no grounds to cancel his lease until a rent agreement was reached, and asked the City to propose a procedure for negotiating the matter. The City then suggested to Ferguson's counsel that, since Ferguson objected to the market value appraisal obtained by the City, Ferguson should obtain his own professionally conducted appraisal. If there was a difference in the appraisals, then the difference could be negotiated. Ferguson never responded.
[2]  There is a split of opinion throughout state courts on the validity of a lease provision which agrees to a future determination of a rental term without specifying either a prescribed method or standard to be used in ascertaining the new rental rate. See generally D. Feld, Validity and Enforceability of Provision for Renewal of Lease at Rental to Be Fixed by Subsequent Agreement of Parties, 58 A.L.R.3d 500 (1974); 2 M. Friedman, Friedman on Leases § 14.1, at 703-808 (1983); 1 W. Jaeger, Williston on Contracts § 45, at 151-52 (3d ed. 1957); R. Schoshinki, American Law of Landlord and Tenant § 9.6, at 613-15 (1980).
[3]  Guin v. Ha, 591 P.2d 1281, 1291 (Alaska 1979); see also 3 A. Corbin, Corbin on Contracts § 541, at 95 (1960).
[4]  Similarly, in Moolenaar v. Co-Build Cos., 354 F. Supp. 980, 982-83 (D.V.I. 1973) the court stated:

First, it will probably effectuate the intent of the parties better than would striking out the clause altogether. A document should be construed where possible to give effect to every term, on the theory that the signatories inserted each for a reason and if one party had agreed to the clause only in the secret belief that it would prove unenforceable, he should be discouraged from such paths. Secondly, a renewal option has a more sympathetic claim to enforcement than do most vague contractual terms, since valuable consideration will often have already been paid for it. The option of renewal is one factor inducing the tenant to enter into the lease, or to pay as high a rent as he did during the initial period. To this extent the landlord benefited from the tenant's reliance on the clause, and so the tenant has a stronger claim to receive the reciprocal benefit of the option.
See also P.J.'s Pantry v. Puschak, 188 N.J. Super. 580, 458 A.2d 123 (App.Div. 1983). In other contexts, this court has adhered to the principle that a contract should be interpreted to give effect, if possible, to all of its provisions. See, e.g., Mitford v. de LaSala, 666 P.2d 1000, 1005 (Alaska 1983); Peterson v. Wirum, 625 P.2d 866, 872 n. 11 (Alaska 1981).
[5]  In determining the validity of agreements to agree, the lessee's reliance on the length of the term is a significant factor. "The fact that the lessee had acted in reliance on the option may be of controlling importance; he may have made valuable improvements... ." 1 A. Corbin, Corbin on Contracts § 97, at 432-33 (1960). See Hammond v. Ringstad, 10 Alaska 543, 544 (D. Alaska 1945), which was upheld in light of the lessee's expenditures, and stated in part: "The rent for such renewal period shall be such as shall hereafter be agreed upon between the parties." In Chaney, the base provision, which was upheld when the lessee made a $10,000 expenditure to improve a bare lot, stated in part: "At the expiration of this lease, Lessor agrees to give Lessee first refusal for an additional term of lease, at rental and terms to be mutually agreed upon at that time... ." 206 P.2d at 669.
[6]  In Altman, the agreement to agree to a future rental term prescribed arbitration as the method of resolution if agreement could not be reached. 677 P.2d at 1224.
[7]  In Moolenaar, the court found that plaintiff was entitled to use the land at the fair market value for its actual use. It reasoned that this valuation most accurately reflected the interest of the original parties to the lease. 354 F. Supp. at 984. Even though the lessor might lose money, when compared to the highest and best use valuation, the court found that the purpose of the long term lease or renewal clause was to insulate the parties from a change in circumstances as to use, and moreover, the lessor had notice of the intended use. Id. at 984-85. See also Certain v. Kovens, 314 So.2d 184, 187 (Fla. Dist.App. 1975), cert. denied, 330 So.2d 18 (Fla. 1976).
[8]  We note that:

It has become a general rule that equity may intervene, in a case where, in order to avoid hardship or injustice, a present need is shown to determine valuation of property held under a partially executed long term-lease which provides for rent adjustments at stated intervals, with the amount of rent for a particular period to be governed by the result of a valuation then made, where failure to make the valuation is not attributable to a fault of the complaining party and appears to have resulted after exhaustion of all reasonable efforts to conform to the lease in that regard, and where the provisions thereof indicate no contrary purpose and prescribe no other course of action.
Annot., Equity Jurisdiction to Determine Valuation, Where Arbitration or Appraisal Has Failed, Under Long-Term Lease Providing for Appraisal of Premises and Fixing Rental Value at Stated Intervals, 26 A.L.R.2d 744, 745 (1952); see also Altman, 677 P.2d at 1224.
[9]  Alternatively, the City takes the position that even if no abuse of discretion occurred, the superior court erred and that the court should not have permitted withdrawal because the City was prejudiced. It argues that it went through great effort to prepare for summary judgment, and that if the admissions are allowed to be withdrawn, it would be prejudiced because the costs of proving the facts, which would otherwise be admitted, would be high.
[10]  The late filing of answers is equivalent to allowing a party to withdraw admissions. Riley v. Northern Commercial, Mach. Div., 648 P.2d 961, 964 (Alaska 1982). Ferguson's motion to withdraw also provided answers to requests deemed admitted.
[11]  The merits are subserved if allowing withdrawal would be in the interest of justice, because the matters deemed admitted are in fact denied by the withdrawing party. Scarlett v. Seaboard Coast Line Ry. Co., 23 Fed.R.Serv.2d 596, 597 (S.D.Ga. 1976).
[12]  The admissions allowed to be withdrawn went to key factual issues raised in the City's complaint and Ferguson's counterclaims. The admissions sought to establish that Ferguson was unwilling to negotiate the rental of the property with the City and that the City had not denied Ferguson full enjoyment of his property. The City also sought to establish through admissions that Ferguson had received offers to sublease the property, apparently, to establish a case for increasing the rent by showing the demand for the property and the possibility of a higher fair market rental value. The withdrawal of these admissions would allow several facts which related to the merits to be litigated and therefore, subserved the merits.
[13]  The cases establish a continuum of three factors to be used to determine whether the party obtaining the admission is prejudiced: how late the motion to withdraw is made in the proceedings, how much notice the obtaining party had of actual contestation of the facts admitted, and the validity of the excuse of the untimely party. The later the motion is made, the more likely that it will be prejudicial, with a higher threshold for granting such motions after trial begins than before trial. Brook Village N. Assocs. v. General Elec., 686 F.2d 66, 71 (1st Cir.1982); Herrin v. Blackman, 89 F.R.D. 622, 624 (W.D.Tenn. 1981); but see Weva Oil Corp. v. Belco Petroleum Corp., 68 F.R.D. 663 (N.D.W. Va. 1975). The more notice the obtaining party had of contestations, the less prejudice will result. Pleasant Hill Bank, 60 F.R.D. at 4; Warren v. International Bhd. of Teamsters, 544 F.2d 334, 339 (8th Cir.1976); Dependahl v. Falstaff Brewing Corp., 491 F. Supp. 1188, 1194 (E.D.Mo. 1980), aff'd. in part and rev'd. in part on other grounds, 653 F.2d 1208 (8th Cir.), cert. denied, 454 U.S. 968, 102 S.Ct. 512, 70 L.Ed.2d 384 (1981). The more willful, bad faith the basis for the nonresponding party's late answer, the more prejudice results. Compare Marshall v. Sunshine & Leisure, Inc., 496 F. Supp. 354, 356 (M.D. Fla. 1980) with Equal Employment Opportunity Comm'n v. Baby Products Co., 89 F.R.D. 129, 131 (E.D.Mich. 1981).
[14]  Civil Rule 36(a) provides: "[I]f the court determines that an answer does not comply with the requirements of [Rule 36], it may order either that the matter is admitted or that an amended answer be served." Alaska R.Civ.P. 36.
[15]  In Baleking Systems v. Heidelberg Eastern, Inc., 40 Fed.R.Serv.2d 1177 (D.Or. 1984), the court found that the defendants had shown plaintiff's failure to timely respond to requests for admissions and plaintiff's motion for late withdrawal, would render the defendant's efforts in moving for partial summary judgment useless. To remedy the problem, the court held that it would allow plaintiff's withdrawal of admissions, but would require that the defendant be compensated for attorney's fees and costs in connection with its motion for partial summary judgment.
[16]  The City suggests that the decision of the superior court to retain jurisdiction may arguably render the superior court's order unappealable because of lack of finality. The test for finality is a practical one which looks to substance and effect rather than to the form of the judgment and focuses primarily on the operational or decretal language of the judgment. Matanuska Maid, Inc. v. State, 620 P.2d 182, 184-85 (Alaska 1980). Here the superior court's judgment determined and declared all rights of the parties which were contested and merely retained jurisdiction to grant subsequent relief upon application of the parties to the court. In substance it was a final judgment.

Even if we were to view the superior court's judgment as lacking finality because of the retention of jurisdiction provision of paragraph 3(c) and the absence of any Civil Rule 54(b) certification, it would be appropriate to treat the appeal as a petition for review. See Kendall v. State, Divison of Corrections, 692 P.2d 953 (Alaska 1984); Leege v. Strand, 384 P.2d 665, 666-67 (Alaska 1963); Alaska Nat. Bank of the N. v. Gwitchyaa Zhee Corp., 639 P.2d 984, 987 n. 2 (Alaska 1981); Aleutian Region R.E.A.A. v. Wolansky, 630 P.2d 529, 531-32 (Alaska 1981).
