
694 P.2d 1340 (1985)
F.W. SCHMIDT, a/k/a William F. Schmidt, Leonard Knutson and Roberta Knutson, Plaintiffs and Respondents,
v.
COLONIAL TERRACE ASSOCIATES, et al., Defendants and Appellants.
No. 84-196.
Supreme Court of Montana.
Submitted on Briefs January 7, 1985.
Decided January 29, 1985.
*1341 Worden, Thane & Haines, Ronald Bender, Missoula, for defendants and appellants.
James A. Cumming, Columbia Falls, for plaintiffs and respondents.
GULBRANDSON, Justice.
This is an appeal from an order of the District Court of the First Judicial District, Lewis and Clark County, Montana. The District Court adopted the findings and conclusions of a special master appointed to determine the matter of offsets against a previous jury verdict awarding defendants damages on their counterclaim. The special master found offsets for services performed by various contractors for the defendants benefit, but did not find that taxes and insurance payments made by plaintiffs were to be offset against the verdict. The District Court also awarded costs and fees to the defendants. We affirm.
This appeal is a continuation of a remand we ordered in Schmidt v. Colonial Terrace (Mont. 1982), 656 P.2d 807, 39 St.Rep. 2318. We will not restate all of the facts leading to this case but rather incorporate the facts as set forth in our prior opinion by reference herein.
This case rests on a contract for the sale of real property, and a construction contract, entered into in 1977. Both parties alleged that the other breached the contract, and litigation ensued. The case came to trial in June of 1981. The jury, while deliberating, asked the District Court whether they were to determine offsets to any verdict reached. The District Court, with the agreement of the parties, instructed the jury to reach a verdict only and to *1342 leave the matter of offsets to the court. The jury returned a verdict of $128,278 in favor of the defendants. The defendants promptly obtained a judgment and executed thereupon. The plaintiffs moved the District Court to amend the judgment and hear and determine the matter of offsets. The District Court denied plaintiffs' motion, and also awarded costs and fees to defendants.
Plaintiffs appealed the District Court's denial of their motion to amend and determine offsets. We ordered that the judgment be vacated and remanded the case to the District Court for further proceedings to determine the offsets, if any. Schmidt v. Colonial Terrace, supra.
Since the order remanding the case to the District Court, a special master Mr. Clayton Herron, an attorney from Helena, Montana, was appointed to determine the matter of offsets. As required by our previous opinion, the special master examined the record only and took no further evidence. He filed a report on November 28, 1983. In that report, he found an offset in the plaintiffs' favor for the amount of $74,363.39. Both parties filed objections to the report. The special master, and the District Court both heard and considered the objections, and both indicated that their conclusions remained the same. On January 17, 1984, the District Court entered its opinion, order and judgment adopting the special master's report. In that order, the District Court also granted fees and costs to the defendants up to June 18, 1981, and costs of the previous appeal to the plaintiffs.
On January 30, 1984, the defendants filed a motion to amend judgment to delete the portion of the judgment that found an offset in the plaintiffs' favor. On February 1, 1984, the defendants filed a motion to assess attorneys fees for the period of June 19, 1981 to that time. Accompanying that motion was a bill of attorneys' fees and expenses. The next day, February 2, 1984, plaintiffs filed a motion to tax costs and an objection to defendants' inclusion of their share of the special master's fee in their cost bill. On February 21, 1984, the plaintiffs submitted their bill of attorneys' fees and expenses and a motion for attorneys' fees and expenses for the post June 18, 1981 litigation. The plaintiffs also filed at that time a motion for restitution of funds, requesting the court to return to them all funds due under the contract. Defendants moved to strike plaintiffs' motion for restitution of funds. The motions were heard in District Court on February 24, 1984.
On February 27, 1984, the District Court entered its order denying defendants' motion to amend judgment, stating: "... The issues presented in defendants' motion to amend have been previously decided by the Court. The Court accepts the master's report and his findings of offsets, and finds no new matters presented which would alter its decision." The District Court also entered an order, on March 19, 1984, denying plaintiffs' motion for restitution of funds.
Defendants filed a notice of appeal on March 28, 1984 raising as issues the District Court's rulings granting plaintiffs' costs on appeal, adopting the special master's report, and the order denying the motion to amend. Several days later, on April 4, 1984, plaintiffs filed their notice of appeal on the finding by the special master, and ruling by the District Court, that plaintiffs were not entitled to offsets for property tax and insurance payments allegedly paid. On March 8, 1984, we remanded the case to the District Court for a determination of attorneys' fees. The District Court entered an order granting costs and fees to the defendants for the period beginning June 19, 1981 until February 1, 1984, in the amount of $17,245.80. The defendants had included in their cost bill submitted to the District Court the amount of $1,444.37 as their share of the special master's fee. The District Court excluded this amount in the final order awarding costs. The parties then submitted briefs, and we consider the matter on appeal.
The parties present the following issues for our consideration:
*1343 (1) Was the District Court in error in adopting the findings and conclusions of the special master?
(2) Was the District Court's order granting costs and fees to the defendants for the period of June 19, 1981 to February 1, 1984, in error? This issue includes the exclusion of the special master's fee from the defendants' cost bill.
Rule 53 M.R.Civ.P. allows a district court to appoint a master in complicated cases to examine the matter and make a report thereupon. Rule 52(a), M.R.Civ.P. provides that "[t]he findings of a master, to the extent that the court adopts them, shall be considered as the findings of the court." Thus, we apply the same standard of review to an adopted master's report that we do to any other district court order. We will only overturn such findings if they are "clearly erroneous." SAS Partnership v. Schafer (Mont. 1982), 653 P.2d 834, 39 St.Rep. 1883. In Wright and Miller, Federal Practice and Procedure, (1971 ed.) § 2585, the authors, discussing the Federal Rule 52(a), which the Montana rule is patterned after, state the general rule that "a finding [is] clearly erroneous only if the finding is without adequate evidentiary support or induced by an erroneous view of the law." The master's report, as adopted by the District Court, is not clearly erroneous in either respect, and must stand.
The special master was appointed in this case to examine the record and make a report as to whether the plaintiffs were entitled to any offsets against the jury verdict. Our order limited his inquiry to the record. His task was to cull through it to find whether it contained any evidence to support an offset for the plaintiffs.
In a very comprehensive and accurate report, the master found that the plaintiffs were entitled to an offset of $74,363.39. He reached this conclusion with the finding that the parties had implicitly consented to trying the issue of certain offsets for repair work done, paid for and "credited" by the defendants. Under Rule 15, M.R.Civ.P., issues not specifically raised in the pleadings may be tried by implied consent if the parties allow evidence pertaining to that issue to be raised at trial. The master further found that the issue of taxes and insurance payments allegedly made by plaintiffs but due from the defendants, had not been sufficiently entered into evidence so as to bring them into issue. In the report, the master stated: "the record does not disclose circumstances and proceedings which would indicate that issues relating to offsets for such taxes or such insurance were tried by the parties with their consent as referred to in Rule 15(b), M.R.Civ.P."
Defendants argue on appeal that the plaintiffs are not entitled to any offsets because the jury verdict could have been based on the fraud or negligence counterclaims, upon which no offsets can be allowed. Thus, they argue, the master's report and District Court's adoption thereof, was clearly erroneous as a matter of law. That argument was considered, and decided, in the previous appeal, see Schmidt v. Colonial Terrace, 656 P.2d at 810, 39 St. Rep. at 2321, 2322. We will not consider it again.
Plaintiffs argue on appeal that the master and the District Court erred in not taking judicial notice of the real estate taxes they paid in the amount of $59,583.21 and insurance payments in the amount of $12,388. They argue that the record is sufficient to support a finding that the plaintiffs paid the taxes and insurance and that the contract called for the defendants to do so; and all that the master and the District Court needed to do was to judicially notice how much those payments were  an amount missing from the record. We do not need to consider plaintiffs' argument as to judicial notice of property, because it is irrelevant to the gist of the master's findings: that the issue of taxes and insurance was not tried with the parties express or implied consent.
Plaintiffs cited the master and the District Court to portions of the transcript where they contend the issue of tax and insurance payments was raised without objection *1344 by the defendants. In the words of the District Court, in its opinion adopting the master's report:
"... after hearing the presentation of both parties and after having examined the objections of both parties to his report, [the master said] that he had considered all of the things the parties referred to in their objections and in their arguments and that nothing he had heard changed his mind in any respect."
Plaintiffs again direct us to the record and to their objections. We have examined the record and do not find that the master's report, or the District Court's adoption thereof was clearly erroneous.
We agree with the District Court's characterization of both parties' objections:
"[T]he plaintiffs and the defendants did not agree with the findings of the master upon the evidence, nor with his conclusions based thereon. They did not contend that he had failed to consider the underlying evidence and issues upon which they base their objections." (Emphasis added.)
The proper issue on appeal is whether the findings of the master, as adopted by the District Court, were clearly erroneous. The issue in that regard, as stated by the District Court, is whether they were without adequate evidentiary support. We have examined the record and find that the report and judgment based thereupon was supported by adequate evidence and employs the correct law. It is not clearly erroneous.
Plaintiffs next contend that the District Court erred in awarding attorneys' fees to the defendants. The contract called for fees and costs to be paid to the "prevailing party" in the event litigation arose from the contract. Plaintiffs contend that since they "prevailed" in the prior appeal, and since the master found an offset in the amount of $74,363.39, which is larger than the net amount now due the defendants, that they are the prevailing party under the contract. They argue that if we uphold the District Court order and award costs and fees to a party who has lost the appeal, such an award would "chill" the incentive for parties to appeal an adverse judgment. Plaintiffs forget that they have already been credited in the District Court order the costs of their successful appeal, under section 25-10-104, MCA. That statute provides that a District Court shall, in most situations, award costs to the successful party on an appeal. This statute removes any disincentive to appeal presented by contractural provisions requiring costs to be paid to the prevailing party.
In Jordan v. Elizabethan Manor (1979), 181 Mont. 424, 593 P.2d 1049, we stated the general rule as to who is to be considered the "prevailing party" within the terms of a contract that calls for the payment of costs and fees to the same: "A prevailing party is the one who has an affirmative judgment rendered in his favor at the conclusion of the entire case." 181 Mont. at 434, 593 P.2d at 1055. In Jordan, the case was not concluded, and we remanded it to the trial court for further proceedings.
In this case we are faced with a situation where there were claims and counterclaims, and that presents the question of what an "affirmative judgment" is. In E.C.A. Environmental Management v. Toenyes (Mont. 1984), 679 P.2d 213, 41 St. Rep. 388, we stated:
"No one factor should be considered in determining the prevailing party for the purpose of attorney fees. The party that is awarded a money judgment in a lawsuit is not necessarily the successful or prevailing party. However, this Court agrees with those jurisdictions that have found the award of money to be an important item to consider when deciding who, in fact, did prevail. Ocean West Contractors v. Halec Const. Co. (1979), 123 Ariz. 470, 600 P.2d 1102. Here, MMI brought suit to recover sums due it on a note usurious on its face. The usury penalty assessed MMI resulted not only in a denial of recovery, but an adverse award. The net judgment was in favor of defendants. The party that survives an action involving a counterclaim, setoff, refund or penalty with the net judgment *1345 should generally be considered the successful or prevailing party." 679 P.2d at 217, 218, 41 St.Rep. at 392, 393.
In a subsequent case, we elaborated upon the general rule quoted above. In Knudsen v. Taylor (Mont. 1984), 685 P.2d 354, 41 St.Rep. 1490, we construed section 70-17-112(5), MCA, which provides for an award of attorneys' fees to the prevailing party in an action to prevent encroachment upon canal or ditch easements. In Knudsen, the plaintiff received a money judgment for damages in his favor, but the defendant succeeded in obtaining an injunction allowing both parties the use of the ditch. Because each of the parties had received some affirmative action in their favor, the District Court did not award attorneys' fees to the plaintiff who had requested it on the basis that he had received a net money judgment. We affirmed the District Court in that case, reasoning that:
"The injunctive order issued by the District Court is a victory and a loss for both sides. [The plaintiff] prevailed in his contention that the culvert must be of sufficient size to carry fully the water from the headgate passing through the Ester Ditch. [The defendant] prevailed in that his right to install such crossing culverts was recognized in this case. In such circumstances, we determine that the District Court was correct in finding in effect there was no prevailing party ..." 685 P.2d at 357, 41 St.Rep. at 1493.
In a case interpreting our costs statute, section 25-10-101, MCA, we considered a situation, such as the one at bar, where a defendant received a money judgment on a counterclaim. In Medhus v. Dutter (1979), 184 Mont. 437, 603 P.2d 669, we stated the following to be the rule:
"If an action is filed, the defendant counterclaims and succeeds in having the plaintiff's claims totally denied but only recovers a portion of the relief demanded in the counterclaim, the defendant should receive costs. If, however, a party initiates a law suit, the defendant counterclaims, and the judgment awards both parties part of the relief they seek, the party prevailing on the main issue in controversy in the case must be allowed costs." 184 Mont. at 447, 603 P.2d at 674.
Although we are dealing in this case with a contract term, and not a statutory award as in Medhus, we hold that the Medhus rule should be applied to the rule stated in E.C.A. Environmental v. Toeynes, supra which also applies here. This case falls into the latter of the Medhus rules because plaintiffs have received part of the relief they requested in their complaint. The main issue in controversy in this case was damages for breach of contract. Plaintiffs had also requested in their complaint that the District Court quiet title in their favor. They did not receive such relief. The jury simply held "in favor of the Defendants on their counterclaim and against the Plaintiffs on their complaint." Defendants succeeded in realizing, at the end of the case, a net judgment in their favor, and thus prevailed on the main issue in controversy.
The District Court also excluded $1,444.37 from defendants' cost bill as their share of the special master's fee. Rule 53(a) M.R.Civ.P. provides that:
"The compensation to be allowed to a master shall be fixed by the court, and shall be charged upon such of the parties or paid out of any fund or subject matter of the action, which is in the custody and control of the court as the court may direct."
This Court has not considered a situation such as this where a master's fee has been apportioned equally among the parties despite a contract clause that calls for costs to the prevailing party. The Montana rule is identical to the Federal rule, and we recognize that the Federal courts have held that a prevailing party is subject to reimbursement from the other party for its share of the special master's fee. See Wright and Miller, Federal Practice and Procedure (1971 ed.) § 2608, n. 72 and cases cited therein. But here, the parties agreed otherwise. In the order of June 25, *1346 1984 assessing the master's fee equally between the parties, the District Court stated:
"Finally, the plaintiffs contend the portion of the cost bill denominated Special Master's fee is improper because the Court has already ordered and required plaintiffs and defendants to share the cost bill equally. The plaintiffs are correct. By Order dated January 5, 1984, the Court ordered each party to pay one-half of the Special Master's fee. The Court will not now alter that Order which was agreed to and followed by all parties." (Emphasis added.)
Normally the District Courts should follow the federal rule and make the non-prevailing party pay, if that is what the contract calls for. But where, as here, the parties subsequently agree otherwise, in effect altering the contract, the District Court should honor that agreement. We hold that the District Court did not err in excluding from the defendants' cost bill that amount attributable to their share of the special master's fee.
Affirmed.
TURNAGE, C.J., and HARRISON, SHEEHY and HUNT, JJ., concur.
