opinion of the Court:
T1 This is a contract dispute between an accounting firm and its client that has ebbed on appeal into a contest over attorney fees and costs. The district court denied Dale Barker's request for attorney fees under the reciprocal attorney fees statute, Utah Code section 78B-5-826. The court of appeals affirmed. It also affirmed denial of Barker's request for costs. We affirm the court of appeals' decision as to attorney fees under our analysis in Hooban v. Unicity International, Inc.,
I
T2 John Bushnell hired the Dale K. Barker Company accounting firm to prepare tax returns for Bushnell and his company, Bush-net, P.C. The services contract between Bushnell and Barker Co. included an attorney fee clause, which provided that, in the event of a breach, the "nondefaulting party shall be entitled to all costs and attorneys' fees incurred in enforcing this Agreement." Bushnell later became dissatisfied with Barker Co.'s work and terminated the parties' relationship. And when Bushnell allegedly failed to pay Barker Co. as agreed under the contract, the company sued Bushnell for breach.
13 Bushnell counterclaimed against Barker Co. for breach of contract and negligence. He also filed a third-party complaint against Dale Barker in his individual capacity, alleging that Barker Co. was Barker's alter ego and seeking to hold Barker liable for any judgment entered against Barker Co.
T4 Near the end of the ensuing bench trial, Barker moved for a directed verdict on the third-party complaint. The trial court granted the motion, dismissing Bushnell's alter ego theory from the bench. After trial, on August 14, 2008, the court entered judgment in favor of Bushnell on Barker Co.'s breach of contract claim and on Bushnell's counterclaim against Barker Co. It did not enter a formal judgment dismissing Bush nell's third-party complaint, however, until September 19.
T5 After granting the motion for a directed verdict but before entering final judgment on the third-party complaint, the district
T6 In his motion, Barker sought attorney fees under the reciprocal attorney fees statute, Utah Code section 78B-5-826. 1 He argued that, as the prevailing party in the third-party action, he was entitled to a fee award under the statute. The trial court denied Barker's request. In a June 2 memorandum decision, the court concluded that Barker was not a party to the Bushnell/Barker Co. contract as required to trigger the statute. ~
' T7 Barker's motion also requested an award of costs, which are generally available to the prevailing party "as of course" under rule 54(d) of the Utah Rules of Civil Procedure. For some reason, the court did not address Barker's request for costs in its June 2 memorandum decision, implicitly denying the request. Before the court entered its final judgment on the third-party complaint, however, Barker filed a rule 59 motion to amend the judgment, asserting that the court should have awarded costs under rule 54(d). Then, before ruling on Barker's rule 59 motion, the court signed a final judgment on September 19, instructing "each party to bear its own costs." Finally, on October 22, the court denied the rule 59 motion, stating that "the issue of costs is premature" because the court had "not yet entered judgment on the Third-Party Complaint." In so doing, the court apparently overlooked its September 19 entry of judgment. At the same time, the district court invited Barker to file a new claim for costs, but he declined and instead filed an appeal.
T8 The court of appeals affirmed as to both fees and costs. It first held that the reciprocal fee statute applies only when "the underlying litigation [is] based upon a contract" that "allow[s] at least one party to recover attorney fees." Dale K. Barker Co. v. Bushnell,
T9 The court next held that Barker was not entitled to costs. It reasoned that, regardless of the district court's misstatement that it had not entered judgment prior to October 22, "the rule 59 motion was the first time the court was asked to determine if rule 54(d) costs would be allowed." Id. ¶ 8. In the court of appeals' view, Barker should therefore have followed "the district court's invitation to [reJsubmit his claim for costs." Id. T 9. Because he did not, the court held that the time for filing under rule 54(d) had lapsed. Id.
110 We granted Barker's petition for cer-tiorari to resolve two issues: (1) whether the court of appeals erred when it affirmed the trial court's denial of Barker's request for attorney fees under Utah Code section 78B-5-826; and (2) whether the court of appeals erred in holding that Barker was not entitled to costs under Utah Rule of Civil Procedure 54(d). We review both decisions de novo, granting no deference to the court of appeals' statutory construction or its interpretation of rule 54(d). See State v. Virgin,
II
'T 11 Barker first contends that he is entitled to attorney fees under the reciprocal fee-
A court may award ... attorney fees to either party that prevails in a civil action based upon any ... written contract ... when the provisions of the ... contract ... allow at least one party to recover attorney fees.
The statute is triggered only when the provisions of the contract would allow at least one party to recover fees if that party had prevailed under its theory of the case. v. Unicity Int'l, Inc.,
T12 Barker argues that this triggering condition is met: "Had Bushnell been sue-cessful in his claim, he would have established that Barker was a party to the contract and that he was personally liable [as a defaulting party]." In Barker's view, the contractual fee provision would then have authorized Bushnell to recover fees from Barker, and Barker is thus entitled to fees under the statute.
Y13 We agree with the court of appeals, however, that Bushnell's alter ego theory-even if successful-would not have made Barker a defaulting party to the contract, but would merely have made Barker personally liable for Barker Co.'s default. This is because "[an alter ego defendant has no separate primary liability to the plaintiff." Shaoxing Cnty. Huayue Imp. & Exp. v. Bhaumik,
TII
114 Barker next contends that the district court should have ruled on his request for costs under rule 54(d) of the Utah Rules of Civil Procedure. We agree and reverse the court of appeals' conclusion that Barker failed to make a timely request for costs. -
{15 Under rule 54(d)(1), "costs shall be allowed as of course to the prevailing party unless the court otherwise directs." To request a cost award, a party must file a "memorandum of costs" with the court within five days after the entry of judgment. Uta R. Crv. P. 54(d)(2). Alternatively, a "memorandum of costs served and filed after the verdict ... but before the entry of judgment is nevertheless considered as served and filed on the date judgment is entered." Id.
{16 Barker was thus required to file his memorandum of costs within five days after the entry of judgment or at some time after the verdict but before the entry of judgment. We conclude that he did so, and thus that the district court should have considered and ruled on this issue.
117 The trial court granted Barker's motion for a directed verdict from the bench on April 3, 2008. This was the date of the "yerdict" in this case for rule 54(d) purposes.
3
Barker filed his memorandum of costs a few weeks later, on May 7, 2008. The district court subsequently entered its judgment on
118 The trial court's ruling on Barker's rule 59 motion was. doubly flawed. First, apparently thinking that costs must always be requested after entry of the judgment, the court concluded that Barker's request for costs was "premature" because the "Court hald] not yet entered [final] judgment." Second, the court also overlooked that it had, in fact, entered judgment on September 19.
19 In our view, the court of appeals also erred in concluding that Barker's rule 59 motion was the "first time the [district] court was asked" to award costs. Dale K. Barker Co. v. Bushnell,
Notes
. Prior to renumbering in 2008, this provision was codified in section 78-27-56.5.
. See also Buack's Law Dictionary 1264 (Oth ed. 2009) (defining "piercing the corporate veil" as "imposing personal liability on otherwise immune corporate officers, directors, or shareholders for the corporation's wrongful acts" (emphasis added)); VFP VC v. Dakota Co.,
. See Brack's Law Dictionary 1696 (Oth ed. 2009) (defining a nonjury verdict as a judge's resolution of the issues of a case).
