
4 Cal.App.4th 238 (1992)
5 Cal. Rptr.2d 470
PERKO'S ENTERPRISES, INC., Plaintiff and Appellant,
v.
RRNS ENTERPRISES et al., Defendants and Respondents.
Docket No. F015043.
Court of Appeals of California, Fifth District.
March 5, 1992.
*239 COUNSEL
Thomas Nast for Plaintiff and Appellant.
Lawrence A. Haun and Roger A. Brown for Defendants and Respondents.
[Opinion certified for partial publication.[*]]
*240 OPINION
STONE (W.A.), Acting P.J.
In the published portion of this opinion we will conclude Code of Civil Procedure[1] section 1033.5, subdivision (c)(2) authorizes a trial court to disallow recovery of a filing fee as a cost if the court determines the fee was not reasonably necessary to the litigation.

THE CASE AND THE FACTS

I


Facts Leading to the Dispute[*]
.... .... .... .... .... .... .... .

II

The Present Lawsuit
On August 1, 1990, Perko's Enterprises, Inc., as franchiser, filed a verified complaint for damages for breach of contract and sublease against the franchisee, RRNS, a partnership, the four partners individually, and Does 1-20. That same day, it also made an ex parte application for a right to attach order against the funds held in escrow from the pending sale of the business between RRNS and Golden West Pancakes. The day before, the attorney for Perko's, Thomas Nast, had notified the office of the attorney for RRNS, Lawrence Haun, of his intention to seek the ex parte attachment order. Haun appeared at the hearing to oppose the motion, which the court denied. At that time, Nast asked Haun to accept service of the complaint on behalf of RRNS. Haun declined. Haun then filed a notice of opposition to application for right to attach order, together with a memorandum of points and authorities and assorted declarations and exhibits. He paid a filing fee of $415.
On August 6, Perko's complaint was dismissed at its request. RRNS thereupon filed a memorandum of costs to recover the $415 filing fee. In response, Perko's moved to tax costs. RRNS opposed the motion and requested the court impose sanctions against Perko's pursuant to section 128.5. By order filed December 4, the court denied the motion to tax costs. *241 It awarded costs of $415 to RRNS and imposed sanctions in the amount of $500. Perko's filed a notice of appeal on November 8 and an amended notice on December 11. The court entered judgment on January 16, 1991.[2]

DISCUSSION

III

Denial of Motion to Tax Costs
(1a) Perko's contends the disputed filing fee is not recoverable as a cost because RRNS's pleadings were filed after the issue which was the subject of the pleadings had been decided. Therefore, it argues, the fee was not a necessary cost. RRNS contraposes recovery of filing fees as costs is such an "accepted and automatic" right it is beyond question. Thus the issue is whether a trial court has the power to disallow those costs which it determines to be unnecessary or unreasonable.
(2) The right to recover costs is purely statutory. (McIntosh v. Crandall (1941) 47 Cal. App.2d 126, 127-128 [117 P.2d 380].) In 1986, the law governing the recovery of costs was substantially revised to create a more detailed and specific statutory framework and to codify existing case law. (7 Witkin, Cal. Procedure (3d ed. 1991 pocket supp.) Judgment, § 84, pp. 98-99.)
Prior to the 1986 amendments, section 1032 provided costs were allowed "of course" to a plaintiff or defendant upon a judgment in his favor in certain specified types of actions, and to a defendant as to whom the action was dismissed. In actions other than those expressly mentioned, costs were allowable in the discretion of the court. Under this earlier scheme, filing fees were recoverable as a matter of course.[3] (International Industries, Inc. v. Olen (1978) 21 Cal.3d 218, 221 [145 Cal. Rptr. 691, 577 P.2d 1031].)
*242 In 1986, section 1032 was rewritten to provide that a "prevailing party" is entitled "as a matter of right" to recover costs in any action or proceeding. (§ 1032, subd. (b).) A "prevailing party" was defined to include "a defendant in whose favor a dismissal is entered, ..." (§ 1032, subd. (a)(4).)[4] In addition, section 1033.5[5] was added to the code to identify specific types of costs which are allowable and others which are not, and to provide that costs not expressly mentioned are allowable at the court's discretion. Under this revised scheme, recovery is now based on the type of cost rather than on the type of action in which it is incurred. Filing fees are among those costs which are expressly allowable. (§ 1033.5, subd. (a)(1).)
(1b) Under both the former and the present statutory schemes, costs are one of two types: those recoverable as a matter of right and those recoverable at the discretion of the court. The question is what, if any, conditions may be imposed on recovery of costs allowable "as a matter of right."
Under the former scheme the statutes did not identify allowable costs specifically, but limited costs recoverable as a matter of right to those incurred in certain types of actions, or by a defendant as to whom an action was dismissed.[6] A party claiming costs was required to file a verified *243 memorandum of costs with the court stating the claimed costs and disbursements were "necessarily incurred."[7] The memorandum was prima facie evidence the items were necessary, but when a cost bill was properly challenged the burden shifted to the party claiming costs to prove their necessity. (Rappenecker v. Sea-Land Service, Inc. (1979) 93 Cal. App.3d 256, 266 [155 Cal. Rptr. 516]; Oak Grove School Dist. v. City Title Ins. Co. (1963) 217 Cal. App.2d 678, 698 [32 Cal. Rptr. 288]; Stenzor v. Leon (1955) 130 Cal. App.2d 729, 735-736 [279 P.2d 802].) The determination of the necessity and reasonableness of a particular expense was within the broad discretion of the court. (Williams v. Atchison etc. Ry. Co. (1909) 156 Cal. 140, 141 [103 P. 885] [only costs necessarily incurred may be recovered]; Estate of Bauer (1943) 59 Cal. App.2d 161, 164 [138 P.2d 721] [determination of whether items are necessary and reasonable is within the discretion of the trial court]; Balfour, Guthrie & Co. v. Gourmet Farms (1980) 108 Cal. App.3d 181, 191-192 [166 Cal. Rptr. 422] [determination of items allowable as costs largely within discretion of trial court].) The court, however, could not award costs that were not authorized by statute. (Wilson v. Board of Retirement (1959) 176 Cal. App.2d 320, 322-323 [1 Cal. Rptr. 373]; Agnew v. Cronin (1959) 167 Cal. App.2d 154, 156-157 [334 P.2d 256]; People v. One 1950 Ford Sedan (1956) 140 Cal. App.2d 647, 650 [295 P.2d 486, 60 A.L.R.2d 809].)
In reviewing the necessity of challenged costs, the courts made no distinction between those allowable as a matter of course and those allowable in the discretion of the court. For example, although filing fees were ordinarily allowable as a matter of course (International Industries, Inc. v. Olen, supra, 21 Cal.3d at p. 221), Gaffey v. Mann (1906) 3 Cal. App. 124, 127 [84 P. 424] held it was not an abuse of discretion to disallow recovery of a filing fee incurred after the underlying action was dismissed, on the theory the fee was incurred unnecessarily. In Teichner v. Klassman (1966) 240 Cal. App.2d 514, *244 524-525 [49 Cal. Rptr. 742], the court noted while a party receiving a favorable judgment is entitled to costs "as of course," the trial court has broad discretion to disallow unnecessary costs upon a motion to tax. Teichner involved installment payments due under a loan contract. The court ruled the appellant could not recover his costs of filing a separate action for each successive installment if he could obtain the desired relief in a single action.
RRNS cites International Industries, Inc. v. Olen, supra, 21 Cal.3d 218 in support of its position that filing fees are recoverable as costs without qualification. The court in International Industries interpreted section 1032 to say a defendant as to whom an action is dismissed is entitled "as a matter of right" (at p. 221) to recover filing fees. The issue in that case, however, was not whether the fees were necessarily incurred, but whether the claimant was the prevailing party. Likewise, other decisions which declare an unqualified right to recover costs allowable as a matter of course do not involve a challenge to the need for the costs. (See, e.g., McMahan's v. McMahan Serv. Corp. (1956) 145 Cal. App.2d 607, 611 [302 P.2d 847] [no need for defendant to expressly ask for costs or for court to expressly award costs]; Schmidt v. Klotz (1900) 130 Cal. 223, 224 [62 P. 470] [court may not routinely require prevailing party to bear own costs]; Stoddard v. Treadwell (1865) 29 Cal. 281, 282 [prevailing party in second trial entitled to recover costs of first trial].)
Therefore, the prevailing view in the case law prior to 1986 held a trial court may disallow costs, including filing fees, which it determines were incurred unnecessarily. That view was codified by the 1986 amendments to the code. Under the present scheme, a prevailing party is entitled as a matter of right to recover filing fees "[e]xcept as otherwise expressly provided by statute, ..." (§ 1032, subd. (b).) Section 1033.5, subdivision (c)(2), added by the 1986 amendments, expressly provides that "[a]llowable costs shall be reasonably necessary to the conduct of the litigation rather than merely convenient or beneficial to its preparation." (See fn. 5, ante.)
(3) It is a fundamental premise of statutory interpretation that the objective is to "ascertain and effectuate legislative intent." (People v. Woodhead (1987) 43 Cal.3d 1002, 1007 [239 Cal. Rptr. 656, 741 P.2d 154].) In determining intent, we look first to the words themselves. "When the language is clear and unambiguous, there is no need for construction." (Id. at pp. 1007-1008.) (1c) The plain language of section 1033.5, subdivision (c)(2) reflects a clear intent to limit the recovery of costs to those which are "reasonably necessary." There is nothing in the language which would limit *245 its application only to costs allowable at the discretion of the court; it applies equally to costs otherwise allowable as a matter of right.
RRNS makes no argument to the contrary; it does not argue section 1033.5, subdivision (c)(2) has any other meaning or its meaning is ambiguous. In fact, it does not even discuss the statute. It relies instead on the unsubstantiated assertion that allowance of filing fees as a matter of right precludes any inquiry into their necessity. Even if it were well established by case law prior to 1986 that the right to recover filing fees as costs was absolute, a court may infer that the Legislature was aware of that construction and intended to alter the law in that regard when it enacted section 1033.5, subdivision (c)(2). (Palos Verdes Faculty Assn. v. Palos Verdes Peninsula Unified Sch. Dist. (1978) 21 Cal.3d 650, 659 [147 Cal. Rptr. 359, 580 P.2d 1155].) Therefore, the intent and effect of section 1033.5, subdivision (c)(2) is to authorize a trial court to disallow recovery of costs, including filing fees, when it determines the costs were incurred unnecessarily.
(4) When a trial court is mistaken about the scope of its discretion, even if the mistake is reasonable, an action taken in accord with that mistaken view is error. (City of Sacramento v. Drew (1989) 207 Cal. App.3d 1287, 1297-1298 [255 Cal. Rptr. 704].) (1d) The trial court's order denying Perko's motion to tax costs provides no explanation of the basis for its decision. It appears the court incorrectly believed it had no authority to disallow the filing fee as a cost. We will, therefore, remand the issue of costs in order to allow the trial court to determine the reasonableness of the filing fee and to exercise its discretion in accordance with this opinion.

IV[*]

Imposition of Sanctions
.... .... .... .... .... .... .... .

DISPOSITION
The judgment and the trial court's order denying appellant's motion to tax costs and awarding respondents' filing fee as a cost and sanctions are reversed and the matter remanded to the trial court for further consideration.
*246 Respondents' request for sanctions on appeal is denied. Costs on appeal to appellant.
Dibiaso, J., and Buckley, J., concurred.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of parts I and IV.
[1]  All statutory references are to the Code of Civil Procedure unless otherwise indicated.
[*]   See footnote, ante, page 238.
[2]  We deem the premature notice of appeal to have been filed after entry of judgment in accordance with rule 2(c) of the California Rules of Court, which provides, in part:

"(c) A notice of appeal filed prior to entry of the judgment, but after its rendition, shall be valid and shall be deemed to have been filed immediately after entry."
[3]  Section 1032, prior to the 1986 amendments, read in part:

"In the superior court, except as otherwise expressly provided, costs are allowed of course:
". . . . . . . . . . . . . . . . . . . . . . . . . . . .
"(b) To the defendant upon a judgment in his favor in special proceedings and in the actions mentioned in subdivision (a) of this section, or as to whom the action is dismissed. When there are several defendants in any action mentioned in subdivision (a) of this section, not united in interest, and making separate defenses by separate answers, and plaintiff fails to recover judgment against all, the court must award costs to such of the defendants as have judgment in their favor."
[4]  Section 1032 now reads, in part:

"(a) As used in this section, unless the context clearly requires otherwise:
". . . . . . . . . . . . . . . . . . . . . . . . . . . .
"(4) `Prevailing party' includes the party with a net monetary recovery, a defendant in whose favor a dismissal is entered, a defendant where neither plaintiff nor defendant obtains any relief, and a defendant as against those plaintiffs who do not recover any relief against that defendant. When any party recovers other than monetary relief and in situations other than as specified, the `prevailing party' shall be as determined by the court, and under those circumstances, the court, in its discretion, may allow costs or not and, if allowed may apportion costs between the parties on the same or adverse sides pursuant to rules adopted under Section 1034."
[5]  Section 1033.5 reads in part:

"(a) The following items are allowable as costs under Section 1032:
"(1) Filing, motion, and jury fees.
"............................
"(c) Any award of costs shall be subject to the following:
"(1) Costs are allowable if incurred, whether or not paid.
"(2) Allowable costs shall be reasonably necessary to the conduct of the litigation rather than merely convenient or beneficial to its preparation.
"(3) Allowable costs shall be reasonable in amount.
"(4) Items not mentioned in this section and items assessed upon application may be allowed or denied in the court's discretion."
[6]  See footnote 3, ante.
[7]  Section 1033, prior to the 1986 amendments, provided in part:

"In superior courts, municipal courts and in justice courts the party in whose favor the judgment is ordered or the dismissal is granted, and who claims his or her costs, must serve upon the adverse party, and file at any time after the verdict or decision of the court, and not later than 10 days after notice of the entry of the judgment or the dismissal, a memorandum of the items of his or her costs and necessary disbursements in the action or proceeding, which memorandum must be verified by the oath of the party, or his or her attorney or agent, or by the clerk of his attorney, stating that to the best of his or her knowledge and belief the items are correct, and that the disbursements have been necessarily incurred in the action or proceeding. A party dissatisfied with the costs claimed may, within 10 days after the service of a copy of the bill of costs, file a motion to have the same taxed by the court in which the judgment was rendered or the dismissal was granted, or by the judge thereof at chambers." (Italics added.)
