SUBSTITUTE OPINION
THE OPINION DATED JULY 31, 2007 IS HEREBY WITHDRAWN.
BURDICK, Justice.Donald and Leslie Smith appeal from the district court’s denial of an award of attorney fees and costs. We reverse and remand.
I. FACTUAL AND PROCEDURAL BACKGROUND
Appellants, Donald Smith and Leslie Smith (the Smiths), sold a duplex located in Post Falls, Idaho to Respondent, Cori Straub. In relation to that transaction, Straub filed a complaint against the Smiths. The Smiths filed a pro se answer in which they did not plead costs or attorney fees. The Smiths retained counsel in November 2004. Then, in December 2004 Straub filed an amended complaint which contained a request for an award of punitive damages. The Smiths did not respond to the amended complaint.
Six days before trial, Straub sent a fax to the Smiths stating she wished to dismiss the case and asking the Smiths to sign a stipulation to the dismissal. On that same day, a motion to dismiss the case with prejudice, signed by Straub’s attorney, and a stipulation to the dismissal signed by the Smiths’ attorney, were filed with the court. Neither the motion to dismiss nor the stipulation mentioned costs or fees. Straub then prepared an order of dismissal for the district court, *68which the court accepted. The order dismissed the case with prejudice and stated there would be no award of fees or costs. Straub did not present the proposed order to the Smiths before submitting it to the district court.
The Smiths then filed a motion for reconsideration of the court’s order of dismissal and a memorandum of costs with the district court. After a hearing on the motion, the district court denied the Smiths’ motion for reconsideration. The Idaho Court of Appeals reversed the denial of the motion for reconsideration and remanded to the district court. This Court, on its own motion, granted a review on the briefs.
II. ANALYSIS
The Smiths appeal the district court’s denial of their motion to reconsider the portion of the court’s order dismissing the case without an award of costs or attorney fees.1 Straub argues that the Smiths waived their right to claim costs and fees and that the Smiths would not be entitled to costs or fees because they did not request them in their pleading. The Smiths ask for attorney fees on appeal. We will address each issue below.
A. The Smiths did not waive their right to claim costs or fees.
Straub argues that because this was an I.R.C.P. 41(a)(1) voluntary dismissal by stipulation of the parties and not an I.R.C.P. 41(a)(2) dismissal by court order, the Smiths waived their right to claim costs and fees when they did not expressly reserve the right in their stipulation. We will first determine the type of dismissal and then address Straub’s waiver argument.
First, Straub argues that the dismissal was pursuant to I.R.C.P. 41(a)(1) and not I.R.C.P. 41(a)(2). Under I.R.C.P. 41(a)(1) “an action may be dismissed by the plaintiff without order of court ... (ii) by filing a stipulation of dismissal signed by all parties who have appeared in the action.” If the defendant does not stipulate to the dismissal, I.R.C.P. 41(a)(2) provides that the “action shall not be dismissed at the plaintiffs instance save upon order of the court and upon such terms and conditions as the court deems proper.”
On April 15, 2005, “[biased upon the plaintiffs motion to dismiss, the defendants’ stipulation and good cause appearing,” the district court entered an order of dismissal. That order dismissed the case with prejudice “and without an award of attorney fees or costs to either party.” Straub argues that this order has no effect because it came after the I.R.C.P. 41(a)(l)(ii) dismissal by stipulation of parties. Although the parties failed to sign the same document stipulating to the dismissal, two documents were filed on the same day stipulating to the dismissal of the case with prejudice. Straub filed a motion to dismiss the case with prejudice and the Smiths filed a document stipulating to the entry of an order granting the plaintiffs motion to dismiss the case with prejudice. These documents were both filed on April 12, 2005; neither document mentioned costs or attorney fees. Even though the two documents filed by the parties use the phrasing “order to dismiss the case,” in substance these documents appear to constitute an I.R.C.P. 41(a)(l)(ii) dismissal. Therefore, because we look to substance over form, In re Weiek, 142 Idaho 275, 279, 127 P.3d 178, 182 (2005), we will consider it a dismissal by stipulation of the parties.
*69However, even if we treat this as an 1.R.C.P. 41(a)(l)(ii) dismissal, there is no support for Straub’s argument that the Smiths waived their claim to costs or fees. First, there was no actual waiver in this case. A waiver is a voluntary, intentional relinquishment of a known right. Frontier Fed. Sav. & Loan Ass’n v. Douglass, 123 Idaho 808, 812, 853 P.2d 553, 557 (1993). There is no indication that the Smiths voluntarily gave up their right to seek costs and fees. Straub notified the Smiths by fax of the dismissal. The fax in its entirety states:
My client has informed me that she no longer wishes to pursue this matter. Our motion to dismiss is attached. If you have no objection, please sign the attached stipulation and return to my office. Otherwise, I will schedule a hearing for the motion.
I have notified the court.
Neither the motion to dismiss nor the stipulation mentions costs or fees. Since in this case the Smiths were unaware that stipulating to dismissal of the case also meant they were agreeing to not pursue costs or fees, there was no voluntary, intentional relinquishment of a known right.
Second, Straub argues that there is an implicit waiver of costs and fees if a defendant signs a stipulation to dismiss a case pursuant to I.R.C.P. 41(a)(1)(h), unless in the stipulation the parties expressly reserve the right to later determine an award of costs and fees, because a dismissal effectively ends the case for all purposes. We disagree.
A stipulation is a contract, and we will apply contractual principles of interpretation when reviewing a stipulation. Maroun v. Wyreless Sys., Inc., 141 Idaho 604, 611, 114 P.3d 974, 981 (2005); Win of Michigan, Inc. v. Yreka United, Inc., 137 Idaho 747, 750-51, 53 P.3d 330, 333-34 (2002). “The determination and legal effect of a contractual provision is a question of law.” Maroun, 141 Idaho at 611, 114 P.3d at 981. Our primary objective when interpreting a contract is to discover the mutual intent of the parties at the time the contract is made. Opportunity, L.L.C. v. Ossewarde, 136 Idaho 602, 607, 38 P.3d 1258, 1263 (2002). “If possible, the intent of the parties should be ascertained from the language of the agreement as the best indication of their intent.” Id. We construe the contract against the person who prepared the contract. Win of Michigan, Inc., 137 Idaho at 751, 53 P.3d at 334.
The stipulation, which was prepared by Straub, is silent on the issue of costs and fees. There is nothing to indicate that when the Smiths signed the stipulation, the silence indicated an intent that the Smiths would forego the opportunity to pursue an award of costs and fees. Furthermore, we have said costs and attorney fees are collateral issues which do not go to the merits of an action and that a district court retains jurisdiction to make such an award after a suit has been terminated. Inland Group of Cos., Inc. v. Obendorff, 131 Idaho 473, 475, 959 P.2d 454, 456 (1998). Thus, the stipulation to dismiss the case with prejudice must be interpreted not to include any agreement regarding costs and fees, which can be awarded after a suit is terminated. Hence, we hold that although the dismissal was pursuant to I.R.C.P. 41(a)(1), the Smiths did not waive their claim for fees and costs by failing to expressly reserve that issue in their stipulation.
B. Costs and attorney fees need not be pleaded.
The Smiths assert that their failure to plead costs is not fatal to their claim for costs. Straub argues that both attorney fees and costs must be pleaded in order to be recovered.2
*70First, I.R.C.P. 54(e)(4) and our decision in Eighteen Mile Ranch, LLC v. Nord Excavating & Paving, Inc., 141 Idaho 716, 117 P.3d 130 (2005), make it clear that generally it is not necessary to plead attorney fees. The appellants in Eighteen Mile appealed the district court’s denial of their post-trial request for attorney fees and costs based on its determination that they were not prevailing parties. Id. at 718, 117 P.3d at 132. The respondents argued that in order to be awarded attorney fees, the prevailing party must state in its pleadings the specific code section constituting the basis for the award. Id. at 720, 117 P.3d at 134. The Court disagreed, relying on I.R.C.P. 54(e)(4), which provides that generally, in a civil action, it is not necessary “for any party in a civil action to assert a claim for attorney fees in any pleading____” Id. The exception to the general rule is that if the basis for attorney fees is something other than I.C. § 12-121, attorney fees must be pleaded to be recovered when the judgment is by default. Eighteen Mile, 141 Idaho at 721, 117 P.3d at 135; I.R.C.P. 54(e)(4). The case before us does not involve a default judgment; thus, to require that attorney fees be pleaded in this case would be contrary to I.R.C.P. 54(e)(4). Hence, we hold it was not necessary for the Smiths to plead attorney fees in order to receive an award.
Second, it is not necessary to plead costs. Straub argues that I.R.C.P. 8(a)(1) requires that costs be pleaded in order to be awarded because according to that rale a pleading shall contain a demand for judgment for the relief the pleader believes he is entitled to and because a party must be put on notice of the fees that will be claimed.3 I.R.C.P. 8(a)(1) states:
A pleading which sets forth a claim for relief, whether an original claim, counterclaim, cross-claim, or third-party claim, shall contain (1) if the court be of limited
jurisdiction, a short and plain statement of the grounds upon which the court’s jurisdiction depends, (2) a short and plain statement of the claim showing that the pleader is entitled to relief, and (3) a demand for judgment for the relief to which he deems himself entitled. Relief in the alternative or of several different types may be demanded.
Nonetheless, the rules as a whole indicate that the type of relief contemplated by I.R.C.P. 8(a)(1) does not appear to include costs of bringing or defending the lawsuit. The rales explicitly state that attorney fees generally need not be included in the pleading. There is no similar rale stating costs need not be asserted in a pleading, but I.R.C.P. 54(d)(1) provides that “[ejxcept when otherwise limited by these rales, costs shall be allowed as a matter of right to the prevailing party or parties, unless otherwise ordered by the court.” Thus, all parties are on notice that costs shall be allowed as a matter of right to the prevailing party. The rale setting out the procedure for a party who “claims costs,” I.R.C.P. 54(d)(5), does not require that costs be pleaded and only requires that a party claiming costs serve a memorandum of costs on adverse parties within fourteen days after the entry of judgment. These rales taken together lead us to conclude that the “relief’ discussed in I.R.C.P. 8(a)(1) does not include costs. Hence, we hold that the failure to plead costs will not preclude an award of costs.
Therefore, we hold the Idaho Rules of Civil Procedure do not require that a party must plead attorney fees, unless the I.R.C.P. 54(e)(4) exception regarding default judgments applies, or costs.
C. The district court abused its discretion by denying the motion for reconsideration.
The Smiths argue that the district court erred when it denied their motion *71for reconsideration. A decision to grant or deny a motion for reconsideration generally rests in the sound discretion of the trial court. Jordan v. Beeks, 135 Idaho 586, 592, 21 P.3d 908, 914 (2001). Abuse of discretion is determined by a three part test which asks whether the district court “(1) correctly perceived the issue as one of discretion; (2) acted within the outer boundaries of its discretion and consistently with the legal standards applicable to the specific choices available to it; and (3) reached its decision by an exercise of reason.” Sun Valley Potato Growers, Inc. v. Texas Refinery Corp., 139 Idaho 761, 765, 86 P.3d 475, 479 (2004) (citations omitted).
The district court abused its discretion because its decision was not consistent with legal standards. The district court stated it was denying the motion for reconsideration because I.R.C.P. 8(a)(1) required that costs and fees be included in the pleading to be recovered and for the alternative reason that the Smiths “failed to cite any rule or basis for the Motion for Reconsideration.” First, as discussed above, I.R.C.P. 8(a)(1) does not require that costs or fees be pleaded in order to be recovered. Hence, to deny the motion on those grounds was inconsistent with legal standards.
As to the second reason for the denial, we disagree that the Smiths failed to cite a rule or basis for the motion. The Smiths made a motion to reconsider pursuant to I.R.C.P. 11(a). However, a party may only make a motion to reconsider interlocutory orders or orders entered after the entry of final judgment. I.R.C.P. 11(a)(2). The dismissal was a final judgment and thus, the Smiths’ motion to reconsider should be treated as a motion to modify or amend the order of dismissal. The Court reviews an order denying a motion to alter or amend judgment for abuse of discretion. Slaathaug v. Allstate Ins. Co., 132 Idaho 705, 707, 979 P.2d 107, 109 (1999). Pursuant to I.R.C.P. 59(e), a district court can correct legal and factual errors occurring in proceedings before it. Id. In this case, the Smiths supported their motion with an affidavit alerting the court to the fact that though the Smiths stipulated to dismissal with prejudice, they did not agree to waive costs. Thus, if the court entered the order denying costs and fees because it understood that to be part of the stipulation terms, the Smiths’ motion alerted it to the factual error and the motion gave it the opportunity to correct that error. Hence, the Smiths specified a sufficient basis for the motion and relief sought. Therefore, because neither of the reasons given by the district court supports a denial of the Smiths’ motion for reconsideration, we hold the denial of that motion was an abuse of discretion, and we reverse and remand the matter to the district court for further proceedings consistent with this opinion.
D. The Smiths are entitled to attorney fees on appeal.
The Smiths request an award of attorney fees on appeal pursuant to I.C. § 12-120(3) which states that in any commercial transaction “the prevailing party shall be allowed a reasonable attorney’s fee____” The mandatory provisions of this statute govern on appeal when the appeal of an order on attorney fees concerns entitlement to them and not the amount of an award. Eighteen Mile Ranch, LLC, 141 Idaho at 721, 117 P.3d at 135. The Smiths were found to be the prevailing party below, have prevailed on appeal and this appeal concerns entitlement to an award of fees; therefore, we award the Smiths attorney fees on appeal.
III. CONCLUSION
We hold the Smiths did not waive their right to claim costs and fees by signing the stipulation to dismiss and that the Smiths’ claim is not defeated by their failure to plead costs or attorney fees. We also hold the district court abused its discretion by denying the Smiths’ motion for reconsideration and remand to the district court. Finally, we award attorney fees on appeal to the Smiths. Costs to Appellants.
Justices W. JONES and HORTON concur.. The Smiths also appeal the district court’s grant of Straub’s motion to amend her complaint to include punitive damages. However, a decision on that issue will not affect the outcome of this case. The Smiths assert they appeal this issue to show that they did not fail in their duty to submit an amended answer and therefore, did not forego a second opportunity to plead costs and attorney fees. Regardless, our decision is not based upon the fact that the Smiths had a second opportunity to plead costs and fees but failed to do so. Furthermore, the Smiths have failed to cite any authority to support the proposition that because the court erroneously allowed the amended pleading, they are relieved of their I.R.C.P. 15(a) duty to respond. See Farber v. Howell, 105 Idaho 57, 59, 665 P.2d 1067, 1069 (1983) (rejecting the argument that appellants were relieved of their responsibility to amend the pleading when the amendment went only to formal or immaterial matters and noting that I.R.C.P. 15(a) clearly requires a party to plead in response to an amended pleading).
. Additionally, Straub argues that even if costs and fees need not be pleaded, the Smiths still would not be entitled to an award in this case. First, Straub asserts that the Smiths would not have been entitled to an award because they could not have been considered prevailing parties. In the hearing on the motion for reconsideration the district court found the Smiths were the prevailing parties. This finding was within the court’s discretion. We have held that a party dismissed before trial can be a prevailing party because it was the most favorable outcome that could have been achieved. Eighteen Mile Ranch, LLC v. Nord Excavating & Paving, Inc., 141 Idaho 716, 719, 117 P.3d 130, 133 (2005). Likewise, in this case, Straub’s voluntary dismissal of her *70case before trial is the most favorable outcome the Smiths could have achieved. Second, Straub argues that the Smiths would not be entitled to fees on the basis of their contract with Straub because that contract was merged into the warranty deed. However, according to the record before us, this issue was not raised below. Generally, we do not consider issues raised for the first time on appeal, Murray v. Spalding, 141 Idaho 99, 101, 106 P.3d 425, 427 (2005), and we decline to do so now.
. Straub also argues that I.R.C.P. 8(a)(1) requires that attorney fees be pleaded as a precursor to an award; however, that is contrary to I.R.C.P. 54(e)(4) which states that generally attorney fees need not be pleaded.