
300 N.W.2d 856 (1980)
WESTCHEM AGRICULTURAL CHEMICALS, INC., a corporation, Plaintiff/Appellee,
v.
Gene ENGEL, Defendant/Appellant.
Civ. No. 9809.
Supreme Court of North Dakota.
December 22, 1980.
*858 Freed, Dynes, Malloy & Reichert, Dickinson, for plaintiff and appellee.
Ralph A. Vinje, Bismarck, for defendant and appellant.
PAULSON, Justice.
Gene Engel, the defendant and appellant ["Engel"], appeals from a judgment entered against him by the Stark County District Court on March 11, 1980. The judgment awarded Westchem Agricultural Chemical, Inc., the plaintiff and appellee ["Westchem"], the sum of $3,665.23, together with costs and disbursements. The judgment also awarded Westchem $1,016.50 as reasonable attorney fees and expenses because the district court determined that Engel's answer to Westchem's complaint contained allegations which were made without reasonable cause and not in good faith, and were found to be untrue. The district court denied Engel's motion to amend that part of the judgment which allowed attorney fees and expenses in favor of Westchem. Engel has appealed from the judgment of the district court. We affirm the judgment of the district court in part and reverse the judgment in part.
Westchem maintains an office in Dickinson. Over a period of years, Westchem sold chemicals used for crop spraying to Engel who failed to pay for the chemicals. On July 23, 1979, Westchem commenced this action against Engel individually. On August 29, 1979, Engel interposed an answer to Westchem's complaint. Engel denied that he had contracted with Westchem as an individual and alleged that his dealings with Westchem had been in his capacity as an officer of G & E Development, Inc., which was a corporation formed by Engel. The documents signed by Engel were signed in Engel's individual capacity and not as the officer of the corporation. The matter was scheduled for trial on February 29, 1980. On the morning of February 29, 1980, Engel informed the district court that the case could proceed as a default proceeding because Engel would not enter an appearance. The judgment entered against Engel by the district court stated in pertinent part:
"G. That the allegations in the Defendant's Answer were made without reasonable cause, not in good faith and found to be untrue and that the Plaintiff is awarded the payment of reasonable expenses actually incurred together with reasonable attorneys' fees and expenses in the sum of One Thousand Sixteen and 50/100 ($1,016.50) Dollars, which will be added to the judgment herein obtained."
Three issues are presented for our consideration. The issues are as follows:
(1) Whether or not the district court's award of attorney fees was premised upon §§ 28-26-01 or 28-26-31, N.D. C.C.
(2) Whether or not the district court properly complied with the requirements of the applicable section when it awarded attorney fees.
(3) Whether or not the district court had the authority to award attorney fees under § 28-26-31, N.D.C.C., in a default proceeding.

I
The first issue concerns whether or not the district court's award of attorney fees was based upon § 28-26-01, or § 28-26-31, N.D.C.C. Subsection 2 of § 28-26-01 provides:
"28-26-01. Attorney's fees by agreementExceptionsAwarding of costs and attorney's fees to prevailing party.
.....
"2. In civil actions the court may, in its discretion, upon a finding that a claim for relief was frivolous, award reasonable actual or statutory costs, or both, including reasonable attorney's fees to the prevailing party. Such costs may be awarded regardless of the *859 good faith of the attorney or client making the claim for relief if there is such a complete absence of factual facts or law that a reasonable person could not have thought a court would render judgment in their favor, providing the prevailing party has in responsive pleading alleged the frivolous nature of the claim."
Section 28-26-31, N.D.C.C., provides:

"28-26-31. Pleadings not made in good faith.Allegations and denials in any pleadings in court, made without reasonable cause and not in good faith, 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 at the trial."
By comparing the district court's judgment with the requirements contained in §§ 28-26-01 and 28-26-31, N.D.C.C., it appears that the district court based its award of attorney fees and expenses on § 28-26-31 rather than on § 28-26-01. Section 28-26-31, N.D.C.C., requires a finding that allegations and denials in any pleadings are made without reasonable cause and not in good faith, and found to be untrue. If these requirements are met, the court must award reasonable expenses actually incurred by the other party together with reasonable attorney fees. The district court's award of attorney fees was based on § 28-26-81 because in the judgment the court concluded that the allegations in Engel's answer "were made without reasonable cause, not in good faith and found to be untrue". This exact language is found in § 28-26-31 and is not present in § 28-26-01, under which an award of attorney fees and costs is discretionary with the court because there is a finding that a claim for relief is frivolous.

II
The second issue concerns whether or not the district court complied with the requirements of § 28-26-31, N.D.C.C., when it awarded reasonable expenses and attorney fees. The awarding of attorney fees and expenses is entirely within the discretion of the trial court. Section 28-26-81 is based upon Illinois law, which, in turn, was taken from New Jersey Laws 1912, p. 377, Schedule A, rule 19. In Matter of Estate of Nelson, 281 N.W.2d 245 (N.D.1979), we held that § 28-26-31, N.D.C.C., requires that attorney fees and costs be summarily taxed by the trial court at the trial. In Nelson, we relied upon the cases of Adams v. Silfen, 342 Ill.App. 415, 96 N.E.2d 628 (1951); and Ready v. Ready, 33 Ill.App.2d 145, 178 N.E.2d 650 (1961), in which the Illinois Appellate Court construed the Illinois equivalent of our § 28-26-31, N.D.C.C. [Section 41 of the Illinois Civil Practice Act (Ill.Rev. Stat.1975 ch. 110, par. 41)]. In Ready, the court determined that the word "trial" as used in the Illinois statute referred to a judicial examination of legal and factual issues between the parties. In Adams, the court determined that the word "summarily" as used in the Illinois statute required that attorney fees and costs be assessed without delay but only after affording the defendant an opportunity to be heard. Engel asserts that the district court committed error when it awarded attorney fees and expenses in a default proceeding.
Generally, attorney fees and expenses are not allowable to the successful litigant in the absence of a statute providing for such an award. Section 28-26-31, N.D.C.C., is the legislature's effort to penalize the litigants who plead false matters or initiate suits without having a basis in law or in fact for doing so and thereby place an undue burden on their opponents. In order to recover expenses and attorney fees, it is necessary to meet the requirements of § 28-26-31, N.D.C.C. The fact that a party interposes an allegation or denial adverse to his opponent does not necessarily mean that the allegation or denial was motivated by bad faith. Although the court may determine that the pleading was made without reasonable cause, the court must nevertheless allow the litigant an opportunity to present evidence in rebuttal and to cross-examine as to the reasonableness of the amounts claimed. Engel was not given the *860 opportunity to contest the imposition of attorney fees and expenses at the time the hearing was held. The district court did not summarily award attorney fees and expenses at the close of the hearing, but, instead, took this matter under advisement. Thus, the district court abused its discretion when it awarded attorney fees and expenses because it did not comply with the requirements of § 28-26-31, N.D.C.C.

III
The final issue concerns whether or not the district court properly granted attorney fees and expenses under § 28-26-31, N.D.C.C., in a default proceeding. Although the allowance of attorney fees is within the discretion of the trial court under § 28-26-31, N.D.C.C., the trial court can exercise that discretion only when the record discloses evidence that the pleadings were made without reasonable cause and not in good faith, and are found to be untrue. The Illinois statute no longer contains the "bad faith" requirement. See Farwell Construction Co. v. Ticktin, 59 Ill. App.3d 954, 17 Ill.Dec. 475, 376 N.E.2d 621 (1978). The Illinois statute has also been modified to allow a trial court to tax costs at any time if it does so pursuant to a motion filed within thirty days of the judgment or dismissal of the cause, instead of requiring that the taxing take place at the time of trial. A default hearing is not the proper stage of a proceeding in which to apply § 28-26-31, N.D.C.C., because the court is able to hear only one version of the controversy, which version is invariably presented to the court in the manner most favorable to the moving party.
Although the moving party may be able to demonstrate that the pleadings were untrue, the moving party cannot usually demonstrate that his opponent was not acting in good faith. An honest mistake in a pleading would prevent an award of attorney fees and expenses under § 28-26-31, N.D.C.C. See Podbielniak v. Podbielniak, 60 Ill.App.2d 357, 208 N.E.2d 625 (1965). Similarly, the opponent is not aware that the truth or sincerity of the pleading is to be questioned and is unable to defend against a motion based upon § 28-26-31, N.D.C.C. Thus, § 28-26-31, N.D.C.C., is not applicable to a default hearing because the opponent must be given an opportunity to be heard before attorney fees and expenses may be imposed under § 28-26-31, N.D.C.C.
Westchem has presented a motion for an award of double costs including reasonable attorney fees under Rule 38 of the North Dakota Rules of Appellate Procedure. Rule 38 involves an initial determination by this court that an appeal is frivolous or that a party has been dilatory in prosecuting an appeal. We conclude that the appeal by Engel is not frivolous because of the substance of the issues raised by Engel and because Engel properly proceeded with this appeal. See Schell v. Schumacher, 298 N.W.2d 474 (N.D.1980); Blue Arm v. Volk, 254 N.W.2d 427 (N.D.1977). For reasons stated in this opinion the judgment of the district court is affirmed in part and that portion of the judgment awarding attorney fees and expenses under § 28-26-31, N.D.C.C., is reversed and remanded for amendment of the judgment consistent with this opinion.
ERICKSTAD, C. J., and VANDE WALLE, PEDERSON and SAND, JJ., concur.
