
191 Ill. App.3d 713 (1989)
548 N.E.2d 654
In re PETITION OF THE VILLAGE OF KILDEER TO ANNEX CERTAIN TERRITORY (The Village of Kildeer, Petitioner-Appellee and Cross-Appellant,
v.
Robert Schwake et al., Respondents-Appellants and Cross-Appellees).
No. 2-89-0364.
Illinois Appellate Court  Second District.
Opinion filed December 13, 1989.
*714 *715 James S. Gordon and Edward Slovick, both of James S. Gordon, Ltd., of Chicago, for appellants.
John M. Mullen, of Conzelman, Schultz, Snarski & Mullen, of Waukegan, for appellee.
Reversed and remanded.
JUSTICE McLAREN delivered the opinion of the court:
The petitioner in these consolidated cases, the Village of Kildeer (the Village), sought to annex certain properties pursuant to the annexation provisions of the Illinois Municipal Code (Ill. Rev. Stat. 1985, ch. 24, par. 7-1-1 et seq.). The Village filed three annexation ordinances with the circuit court of Lake County, which in turn found the annexations valid. Certain affected property owners (the objectors) moved pursuant to section 2-1401 of the Code of Civil Procedure (the Code) (Ill. Rev. Stat. 1985, ch. 110, par. 2-1401) to vacate the prior orders validating the annexation ordinances. The trial court granted the motions to vacate, and the Village appealed to both this court (In re Petition of Village of Kildeer (1987), 162 Ill. App.3d 262) and subsequently to the Illinois Supreme Court (In re Petition of Village of Kildeer (1988), 124 Ill.2d 533). After the cause was remanded to the trial court, the Village filed a motion to voluntarily dismiss the annexation proceedings pursuant to section 2-1009 of the Code (Ill. Rev. Stat. 1987, ch. 110, par. 2-1009). At the same time, the objectors filed a motion pursuant to section 2-611 of the Code (Ill. Rev. Stat. 1987, ch. 110, par. 2-611) seeking sanctions against the Village.
The trial court granted the Village's motion to dismiss the proceedings and also awarded the objectors their previously incurred deposition transcript costs. Subsequently, the trial court denied the objectors' section 2-611 motion for sanctions and also denied the objectors' motion to amend their section 2-611 motion. The objectors now appeal from the entry of both orders, and the Village cross-appeals from the trial court's award of deposition costs. At issue on appeal is the propriety of the trial court's denial of the objectors' motions to amend their section 2-611 motion and also the trial court's award of deposition costs in favor of the objectors. We reverse the trial court's determinations on both issues and remand for further proceedings on the objectors' section 2-611 motion.
The facts surrounding the Village's annexation proceedings are set out in both of the previous opinions filed in these cases on review *716 (In re Petition of Village of Kildeer (1987), 162 Ill. App.3d 262, 265-67, aff'd (1988), 124 Ill.2d 533, 536-42), and so only a short summary is necessary here. In February 1986, the Village enacted three annexation ordinances. Each ordinance sought to annex an area equal to approximately 10 acres but, if annexation of each of the three parcels of land had been successful, a much larger tract of land would have been effectively circumscribed by the newly annexed areas. Moreover, though each ordinance sought to annex less than 10 acres, more than 10 acres of the property of certain individual landowners would have been included in the total amount of property covered by the three ordinances. Such an annexation could not legally have been undertaken without each landowner's consent. (See Ill. Rev. Stat. 1985, ch. 24, par. 7-1-2; In re Petition of Village of Kildeer, 162 Ill. App.3d at 277.) The Village filed the three annexation petitions, and each was assigned to a different circuit court judge. Notification of the ordinances was published in the Chicago Sun-Times, even though the Village admitted that such notice is normally made in local newspapers.
In March 1986, different circuit court judges separately approved each of the three ordinances, and a referendum on each petition was set for November 4, 1986 (see Ill. Rev. Stat. 1985, ch. 24, pars. 7-1-4, 7-1-6). Before the referenda, in August 1986, the objectors, who are owners or trustees of affected properties, filed petitions in each case pursuant to section 2-1401 of the Code (Ill. Rev. Stat. 1985, ch. 110, par. 2-1401) seeking to vacate the three orders. All three orders were thereafter vacated, and the Village appealed in all three cases. The objectors cross-appealed from the findings in Nos. 86-MC-3 and 86-MC-4 that the Village had complied with statutory notice requirements. The three petitions were consolidated for appellate review.
On appeal, this court affirmed the trial courts' granting of the section 2-1401 petitions to vacate in Nos. 86-MC-4 and 86-MC-2. We reversed and remanded with regard to No. 86-MC-3 in order that the Village might be allowed to file a response to the objectors' section 2-1401 petition. We also reversed the trial court's determination in No. 86-MC-4 that the Village had complied with the statutory notice requirements. The cross-appeal in No. 86-MC-3 was not timely filed, and therefore, we did not rule on it. (162 Ill. App.3d at 280.) The Village again appealed, but the supreme court affirmed the decision of this court. 124 Ill.2d at 551.
After remand from the supreme court, the Village sought to voluntarily dismiss all proceedings pursuant to section 2-1009 of the Code. The other parties objected to dismissal, and, on the same day *717 that the Village filed its motion to dismiss, the objectors filed a section 2-611 motion seeking sanctions against the Village and its attorney based on the improper annexation proceedings. On December 12, 1988, the trial court granted the Village's motion to dismiss the proceedings and assessed against the Village only the deposition transcript costs previously incurred by the objectors. After setting the question of the section 2-611 motion for hearing, the court received written memoranda from both parties. Also, the parties subsequently stipulated that the section 2-611 motion was withdrawn to the extent that it sought sanctions against the Village's attorney.
In relevant part, the memoranda and replies of the Village asserted that the objectors' section 2-611 motion was insufficient because it failed to specify the improper conduct upon which it was based and also because it failed to specify the costs to be assessed. The objectors responded that the motion, combined with the more specific allegations contained in supporting memoranda, was sufficient to properly entitle them to recovery under section 2-611. The objectors' memorandum filed March 14, 1989, also noted that, if the trial court found the motion to be insufficiently specific, then the objectors should be given leave to amend the section 2-611 motion.
A hearing on the objectors' section 2-611 motion was held on March 20, 1989. The Village's surreply memorandum was not filed with the court until March 20, and the objectors asked that they be allowed to file additional material if the court denied their motion based on the Village's surreply memorandum. The trial court suggested that the hearing might be continued until a later date, but counsel for the objectors asked that the hearing proceed. The Village pressed its contention that the section 2-611 motion was insufficient because of its lack of specificity. The objectors argued that the motion, combined with its supporting memoranda, was sufficiently specific. Counsel for the objectors also again asked that they be allowed to amend their motion if the court determined that the motion was not sufficiently specific.
On the basis of this court's holding in Brandel Realty Co. v. Olson (1987), 159 Ill. App.3d 230, the trial court denied the section 2-611 motion for its failure to specify the conduct on which it was based and the costs the objectors sought to recover. After the trial court so ruled, the objectors again asked the court to allow them to amend their section 2-611 motion to make it more specific. The court ruled that the objectors' request to amend the motion was not timely, and thus it was denied. A written order denying the section 2-611 motion was filed the same day. On April 10, the objectors filed a motion seeking *718 leave to file an amended section 2-611 motion. This motion was accompanied by the objectors' amended section 2-611 motion, but the trial court again refused to grant the objectors leave to file the amended motion. The objectors now appeal from both the March 20 order denying their original section 2-611 motion and the April 10 order denying them leave to file an amended motion. The Village cross-appeals from the trial court's award of deposition costs to the objectors.
 1, 2 Though an order granting a party's motion to dismiss proceedings pursuant to section 2-1009 of the Code is generally a final and appealable order (Espedido v. St. Joseph Hospital (1988), 172 Ill. App.3d 460, 466), the pendency of the section 2-611 motion here prevented the December 12, 1988, order from becoming final and appealable (Palmisano v. Connell (1989), 179 Ill. App.3d 1089, 1095; Hise v. Hull (1983), 116 Ill. App.3d 681, 683). The trial court's order denying the objectors' section 2-611 motion disposed of all remaining issues between these parties, thus making it a final and appealable order. The objectors' subsequent motion seeking leave to file an amended section 2-611 motion, which was filed after the final order must be considered a post-trial motion per section 2-1203 of the Code of Civil Procedure (Ill. Rev. Stat. 1987, ch. 110, par. 2-1203). (See Herman v. Fitzgerald (1989), 178 Ill. App.3d 865, 868-69.) This motion, having been filed within 30 days of the final judgment, was timely. (Ill. Rev. Stat. 1987, ch. 110, par. 2-1203.) Our jurisdiction over the appeal is therefore proper pursuant to Supreme Court Rule 303(a)(1) (107 Ill.2d R. 303(a)(1)), and jurisdiction over the cross-appeal is proper pursuant to Supreme Court Rule 303(a)(3) (107 Ill.2d 303(a)(3)).
 3 The issue raised by the objectors' appeal of both orders is whether the trial court correctly denied their motions seeking leave to amend their section 2-611 motion. The propriety of the trial court's dismissal of the section 2-611 motion on its merits is not at issue. Initially, we reject the Village's contention that we may not review the trial court's denial of the defendant's oral motions at the March 20 hearing seeking leave to amend their section 2-611 motion. The defendant asserts that the order issued following the hearing does not reflect the oral motions and, therefore, that an appeal from the order cannot encompass the oral motions. The transcript of the hearing, however, clearly shows that such motions were made and that they were inextricably linked to the resulting order. In any event, an appeal from a final judgment will draw into question all prior nonfinal rulings and final but nonappealable orders which produced the judgment. *719 First National Bank v. St. Charles National Bank (1987), 152 Ill. App.3d 923, 930.
The parties on appeal are in disagreement as to which version of section 2-611 applies in this case. The statute in effect when the annexation proceedings began, in March 1986, allowed for the imposition of sanctions against a party. The statute reads in relevant part:
"Allegations and denials, made without reasonable cause and found to be untrue, shall subject the party pleading them to the payment of reasonable expenses, actually incurred by the other party by reason of the untrue pleading, together with a reasonable attorney's fee, to be summarily taxed by the court upon motion made within 30 days of the judgment or dismissal." (Ill. Rev. Stat. 1985, ch. 110, par. 2-611.)
The most recent version of the statute differs somewhat. It provides that sanctions can also run against a party's attorney, and the statute applies to "[e]very pleading, motion and other paper" filed. (Ill. Rev. Stat. 1987, ch. 110, par. 2-611.) The statute provides that the signature of a party or an attorney constitutes a certificate that, among other things, the document in question "is well grounded in fact and is warranted by existing law * * * and that it is not interposed for any improper purpose." Ill. Rev. Stat. 1987, ch. 110, par. 2-611.[1]
 4 We believe that the resolution of the objectors' section 2-611 motion does not depend upon which version of the statute is applied. First, the substantive obligations of the parties are the same under both versions. (See Prevendar v. Thonn (1988), 166 Ill. App.3d 30, 40.) For example, here the gist of the objectors' section 2-611 motion is that the Village initiated illegal annexation proceedings and that it advanced specious arguments in defense of these proceedings in the circuit court and on appeal. Though this conduct, if proved, would be redressable under the more recent version of section 2-611, it would also be so under the prior version. It has long been recognized that this section is designed to "penalize the litigant who pleads frivolous or false matters or brings a suit without any basis in law and thereby puts the burden upon his opponent to expend money for an attorney to make a defense against an untenable suit." (Emphasis added.) Ready v. Ready (1961), 33 Ill. App.2d 145, 161.
*720 Second, as we shall proceed to show, the question presented here, namely, whether the trial court should have allowed the objectors to amend their motion, must be answered according to the general rules pertaining to the amendment of pleadings. As such, the answer to the question would be the same under either version of section 2-611.
 5 We believe that the objectors' initial requests to amend their section 2-611 motion must be reviewed according to the standards set out in section 2-616 of the Code (Ill. Rev. Stat. 1987, ch. 110, par. 2-616). This provision allows amendments "on just and reasonable terms" at any time before final judgment. As we have already noted, the trial court's denial of the objectors' section 2-611 motion comprised the final judgment in this case. Since the objectors orally requested leave to amend their motion before the actual entry of the final order, the oral motion was brought before final judgment. (Schwaner v. Belvidere Medical Building Partnership (1987), 155 Ill. App.3d 976, 989.) Section 2-616 applies to an attempt to amend "in any matter, either of form or substance, in any process, pleading, bill of particulars or proceedings, which may enable * * * the defendant to make a defense or assert a cross claim." (Ill. Rev. Stat. 1987, ch. 110, par. 2-616.) Though a motion under section 2-611 is not precisely a cross-claim, we believe that the provisions of section 2-616 are broad enough to include a section 2-611 motion for the imposition of sanctions.
 6 The decision whether to allow a motion requesting leave to amend under section 2-616 rests within the sound discretion of the trial court, and its decision will not be disturbed on appeal absent an abuse of that discretion. (Schwaner, 155 Ill. App.3d at 988.) Among the factors to be considered in determining whether the trial court properly exercised its discretion is whether the proposed amendment would cure the defective pleading, whether it could cause prejudice or surprise to other parties, the timeliness of the proposed amendment, and whether previous opportunities to amend could be identified. Schwaner, 155 Ill. App.3d at 988.
Here, these factors all weigh in favor of allowing the objectors to amend their section 2-611 motion. First, it is clear from the contextual history of this litigation that the objectors could have amended their motion sufficiently to cure the defect of which the Village complained. The original section 2-611 motion sought to impose sanctions based on the underlying illegality of the annexation actions and for the arguments advanced by the Village in proceeding with them. To redress the lack of specificity in the motion, counsel for the objectors requested that they be allowed to amend their claim to specify *721 the particular pleadings underlying the cause. The history of the underlying action, which is well known to both this court and the trial court, clearly indicates that the objectors could have amended their motion to specify the underlying pleadings upon which the illegal annexations were based. Similarly, because the objectors sought to recover their attorney fees for the entire action, calculation and specification of this amount could have been easily accomplished had amendment of the motion been allowed.
Second, there is no indication whatsoever that an amendment of the pleadings would have caused prejudice or unfair surprise to the Village. The memoranda the objectors submitted in support of their section 2-611 motion spelled out, inter alia, their allegations that the Village intentionally split into three proceedings an annexation scheme which was, as a whole, clearly illegal; that it filed the annexation ordinances with three different judges to allow the scope of the total annexation to go undiscovered; and that it published notice designed to maintain the secrecy the Village created to obscure the annexation actions. This sufficiently apprised the Village of the nature of the amendment sought. The Village took the position that the objectors' section 2-611 motion was not specific enough; allowing amendment of the motion to make it more specific would prevent, not promote, unfair surprise.
Third, as we have already noted, the objectors' oral motion seeking leave to amend the section 2-611 motion was timely because it was made before the issuance of the final order.
Finally, we believe that the objectors did not pass up previous opportunities to amend their motion. The March 20 hearing constituted the trial court's first and only consideration of the section 2-611 motion. Though the objectors argued in their memoranda that their motion was legally sufficient, they did not merely stand on the motion as it existed. The objectors made it clear that, if the trial court found the motion to be insufficiently specific, then they should be allowed to amend it to correct such a defect. We do not accept the Village's assertion that the objectors rejected the trial court's offer to allow them to amend their section 2-611 motion. A review of the transcript of the March 20 hearing indicates that the parties were more likely discussing the possibility that the objectors might wish to file an additional memorandum in support of their motion because the Village had filed its last memorandum only on the day of the hearing. Though the objectors opted to proceed with the hearing without filing an additional memorandum, they cannot be said to have abandoned their position that they should be allowed to amend the motion itself if it was *722 subsequently found to be lacking.
 7, 8 The test as to whether a trial court has properly exercised its discretion in ruling on a request to amend pleadings "is whether the amendment furthers the ends of justice." (DiBenedetto v. County of Du Page (1986), 141 Ill. App.3d 675, 681.) Indeed, this is "the paramount consideration." (Hoffman v. Nustra (1986), 143 Ill. App.3d 259, 266.) Here, denial of the opportunity to amend their section 2-611 motion would mean that the objectors had one, and only one, opportunity to file the motion correctly, and their failure to do so on the first effort would effectively bar their claim forever. This, we believe, is patently unjust. We conclude, therefore, that the trial court abused its discretion by denying the objectors' oral motion seeking the opportunity to amend their section 2-611 motion. This conclusion is only strengthened by the written motion the objectors subsequently filed which not only reiterated their prior position, but also was accompanied by the amended motion the objectors wished to file.
Finally, we must resolve the Village's cross-appeal from the trial court's award of deposition transcript costs to the objectors. The Village cites Galowich v. Beech Aircraft Corp. (1982), 92 Ill.2d 157, in support of its contention that the trial court erred by assessing against the Village the objectors' deposition costs because the depositions were not used at trial. The objectors contend that the hearings on their section 2-1401 petitions essentially constituted trials and, therefore, that the trial court properly awarded them their deposition costs.
 9 In Galowich v. Beech Aircraft Corp., the supreme court held that Supreme Court Rule 208(d) (73 Ill.2d R. 208(d)) authorizes the trial court to tax as costs the expenses arising from the taking of depositions only if they are used at trial; therefore, such costs could not be assessed against a plaintiff who voluntarily dismissed an action before trial. (Galowich, 92 Ill.2d at 166.) The use of a deposition transcript at trial is necessary to authorize the trial court's award of costs pursuant to Rule 208(d). (Howell v. Thompson (1987), 161 Ill. App.3d 466, 468.) The objectors' characterization of the hearings on the section 2-1401 petitions as "trials" is simply at odds with the clear language of the supreme court. Since these cases never came to trial, the trial court erred by taxing deposition costs against the Village. We therefore reverse the order of the trial court granting these costs, but we also note that such costs may properly be recovered under a section 2-611 motion. See Galowich, 92 Ill.2d at 168.
The judgment of the trial court denying the objectors leave to file an amended section 2-611 motion is reversed, and the cause is remanded *723 for further proceedings. We also reverse the trial court's order taxing against the Village the deposition costs of the objectors.
Reversed and remanded.
REINHARD and WOODWARD, JJ., concur.
NOTES
[1]  Newly enacted Supreme Court Rule 137 (134 Ill.2d R. 137) also pertains to the issue of sanctions against a party or attorney for the bringing of frivolous or baseless suits or the filing of false pleadings. Since this appeal preceeded the August 1, 1989, effective date of Rule 137, we need not consider whether and to what extent the rule supercedes section 2-611 of the Code. See Rule 137 (June 28, 1989) Official Reports Advance Sheet No. 13 (eff. Aug. 1, 1989).
