
318 N.W.2d 844 (1982)
Sandra JADWIN, etc., Plaintiff,
v.
Paul A. KASAL, et al., etc., Respondents,
Federal Land Bank of Saint Paul, Respondent,
Kump Lumber, Inc., Appellant.
No. 81-677.
Supreme Court of Minnesota.
May 7, 1982.
*846 Grundhoefer & Neuville and Thomas M. Neuville, Northfield, for appellant.
Peter Kasal, Hutchinson, for Paul A. Kasal, et al.
Thomas M. Loftus, Prior Lake, for Federal Land Bank of Saint Paul.
Considered and decided by the court en banc without oral argument.

OPINION
PETERSON, Justice.
This appeal in an action to foreclose a mechanics lien arises out of the construction of a home for respondents Paul and Carol Kasal. Sandra Jadwin commenced this action to foreclose a mechanics lien against the Kasals, joining as defendants the Federal Land Bank of St. Paul (bank) and Kump Lumber, Inc. (Kump). Jadwin's claims were settled before trial, so the issues litigated were those arising out of Kump's cross-complaint against the Kasals for the balance due on building materials supplied by Kump and out of the bank's prayer that the amount, validity and priority of all liens and encumbrances be adjudged.
Kump challenges the judgment of the trial court on four counts, contending that: (1) the trial court erred in its valuation of Kump's lien, (2) the trial court abused its discretion in denying Kump's motion to amend its cross-complaint, (3) the award of $500 attorney fees to Kump was so inadequate as to constitute an abuse of discretion and (4) the trial court erred in concluding that the bank's mortgage interest was prior and superior to Kump's mechanics lien. The bank appeals from the trial court's denial of contractual attorney fees.
Paul Kasal obtained a blueprint from Ray Getting, a Kump employee, early in 1978 and proceeded to take bids and arrange for financing of his new home. On April 12, 1978, Getting gave Kasal an estimate on behalf of Kump for lumber and various other building materials. This estimate totaled $25,628.30, including tax and credit for a 20% contractor's discount. Shortly thereafter, Kasal and Getting met for the purpose of reducing this estimate. By down-grading the quality of certain materials and agreeing to supply other materials himself, Kasal lowered the estimate to $20,626.60.
Kasal took the amended estimate figures and estimates from other subcontractors to the Federal Land Bank of St. Paul to negotiate financing. A mortgage commitment of $52,000 was issued by the bank on June 30, 1978, and a construction agreement, setting forth the specifications upon which the loan was conditioned, was executed on July 1, 1978.
Upon receiving the mortgage commitment, Kasal instructed Kump to begin delivery of building materials. The record does not reveal the exact date that visible improvement to the land began, but it could be no later than July 13, 1978, the date of Kump's first delivery of materials to the site. The mortgage, however, was not executed until August 16, 1978. It was recorded 2 days later.
Numerous changes in the construction plans were made as the house was being built. Kasal concedes that some of the changes were authorized by him and estimates that the cost of these changes was $8,534. Kasal admitted at trial that it is "very possible" his estimate leaves out some changes that were not covered in the original Kump estimate.
Kump asserts that all materials supplied to the construction site were authorized by Kasal. By totaling the invoices reflecting all deliveries, Getting determined that $34,475.67 of materials were supplied, or $13,849.07 above the Kump estimate.
*847 In addition to the $5,315.07 discrepancy in the amount of "extras" for which each party would hold Kasal responsible, the parties dispute whether the deletion of a screen porch from the original plans entitled Kasal to a credit of $1,500.
1. The trial court, working with conflicting testimony and inconsistent documentary evidence,[1] treated the amended Kump estimate as establishing a base price, adopted Kasal's testimony with regard to the value of "extras" and declined to recognize the $1,500 credit for the screen porch. The trial court's findings of fact with respect to the formation and terms of the contract "are entitled to the same weight as those of a jury and will not be reversed unless manifestly and palpably contrary to the evidence." Malmin v. Grabner, 282 Minn. 82, 86, 163 N.W.2d 39, 41 (1968). See also Brekken v. Holien, 289 Minn. 95, 182 N.W.2d 717 (1970). Furthermore, where it is contested whether all items claimed in the lien statement are lienable, the burden is properly upon the party seeking the lien to clearly segregate the items and their value at the trial. Pittsburgh Plate Glass Co. v. Brown, 152 Minn. 325, 188 N.W. 569 (1922). Viewing the evidence in the light most favorable to the Kasals, we conclude that the evidence supports the trial court's findings.
The written estimate is not signed by the parties, is clearly marked "Estimate" and fails to state how long the quoted prices are guaranteed, but there is evidence that it was to be the last word as to the construction materials contemplated by it. The parties knew that the estimate would be used to obtain financing. The meeting between Kasal and Getting to reduce the estimate indicates that Kasal relied on the estimate and that the total cost was of critical importance to him. The copy of the estimate received by Kasal did not contain the unit prices of the materials but only the total cost of the house. Thus, only Kump was in a position to monitor whether the cost of the house was staying within budget. Cf. Carlson v. Maughmer, 168 N.W.2d 802, 804-05 (Iowa 1969) (where owners were led to believe during construction that costs were staying within budget, trial court finding that estimate established contract price would be affirmed). Kump never told Kasal that the estimate was not a reliable measure of cost until after the last materials were delivered.
With respect to modifications made after the initial estimates, the trial court reasonably relied on Kasal's less precise, but more usable, cost estimates for those changes. Kump presented no clear evidence to rebut Kasal's calculations. The omission from Kasal's calculations of taxes and certain materials that may have been overlooked is adequately compensated for by the trial court's refusal to deduct the alleged savings from deleting the screen porch.
The trial court's valuation of the mechanics lien at $21,713.32 plus 8% interest is affirmed.[2]
2. Kump maintains that the 20% contractor's discount enjoyed by Kasal was conditioned on buying materials exclusively from Kump and paying for materials within 30 days. Kump did not revoke the discount during the construction period, at the time it filed its statutory lien statement, or in its original cross-complaint. In its request for admissions Kump still did not dispute the applicability of the discount. Only after the trial court permitted Kasal to put the value of unpaid materials in issue (after Kasal had apparently admitted Kump's valuation) did Kump move to amend its complaint to add back 20% of the total list price.
*848 Kump argues that the motion to amend was wrongfully denied. The cross-complaint has alternatively alleged statutory and constitutional liens and as a result Kump was not limited by its statutory lien statement. The danger of prejudice was slight, Kump argues, because the motion was served 6 weeks before trial, the issue whether prompt payment was a condition of the discount would not require complex proof and there was no danger of confusion of issues.
We do not consider whether the denial of Kump's motion constitutes an abuse of discretion and grounds for reversal because the parties in fact tried the issue by consent. Getting and Kasal were questioned and cross-examined, without objection, as to their understanding of the 20% discount. Although the trial court made no explicit finding on the issue, the testimony clearly does not establish the alleged condition as a term of the contract.
3. Kump claimed attorney fees of $1,900, presenting evidence by affidavit, and the trial court awarded $500. The amount of the award is within the discretion of the trial court, but it is accepted that the factors to be considered are: time and effort required, novelty or difficulty of the issues, skill and standing of the attorney, value of the interest involved, results secured at trial, loss of opportunity for other employment, taxed party's ability to pay, customary charges for similar services, and certainty of payment. Annot., 58 A.L.R.3d 201, 207 (1974).
Attorney Thomas M. Neuville spent 38 hours on this matter and succeeded in foreclosing a lien valued at $21,713.32, albeit substantially less than the $27,512.56 claimed in the lien statement. The trial was conducted in 1 day, and Attorney Neuville called one major witness and one less significant witness before resting. In view of the trial court's broad range of discretion in awarding attorney fees, and its superior vantage point for observing many of the relevant factors, we cannot say that the trial court abused its discretion in awarding attorney fees of $500.
4. Minn.Stat. § 582.01 (1980) authorizes a mortgagor to covenant to pay, or authorize the mortgagee to retain, an attorney fee in case of foreclosure. The court is to fix the amount of the fee in case of foreclosure by action. In the present action, the Kasals agreed to "pay any expenses and attorney's fees incurred by the mortgagee for the protection of the lien of this mortgage," but the trial court denied the bank's request.
Where a contractual provision for attorney fees is clearly authorized by statute, the meaning and intent of the parties as expressed in the specific language of the mortgage should be controlling. Cf. Poppler v. O'Connor, 306 Minn. 539, 542, 235 N.W.2d 617, 619 (1975) (intent of parties should control whether fees will be allowed on appeal). Here, however, the language in the mortgage goes beyond the statutory authorization. The bank did not seek foreclosure in this action; it requested and obtained only a determination of priority vis-a-vis Kump's mechanics lien. While this would arguably fall within the covenant language "incurred * * * for the protection of the lien of this mortgage," it falls outside the statutory provision.
The agreement of the parties cannot be enforced in this instance because, as we hold infra, the bank is not a prevailing party in this action and considerations of public policy militate against awarding attorney fees to a nonprevailing party. Requiring the mortgagor to underwrite all of the bank's legal actions taken with respect to the mortgagor's property would encourage ill-considered litigation and farfetched claims by the bank and discourage the mortgagor from challenging the liens claimed by subcontractors and materialmen.
5. The final issue concerns the priority of encumbrances on the Kasal property held by Kump and the bank. The bank's mortgage was executed and recorded subsequent to the first signs of visible improvement to the property and after Kump had made its first delivery of building materials to the site. As a general rule, a mechanics lien, which attaches at the time *849 the first item of material or labor is furnished upon the premises, has priority over a construction mortgage that is not recorded until after the lien has attached. Minn. Stat. § 514.05 (1980). An exception to this rule is the priority given to an executed, but unrecorded, mortgage of which a mechanics lienor had actual notice at the time the lien attached. Id. The bank argues, and the trial court so held, that the "actual notice" exception should be extended to cases where a lienor has notice at the time its lien attaches of a mortgage commitment preliminary to an as yet unexecuted and unrecorded mortgage.
We acknowledge that a mortgage commitment is part of a continuous transaction culminating in the execution and recording of the mortgage instrument. Nevertheless, the "actual notice" exception contained in the first sentence of section 514.05[3] requires notice of an existing encumbrance on the land and not merely of negotiations leading up to it. We have held in the converse situation that, where a mortgagee acquires a mortgage interest with actual notice of a lienor's architectural services performed prior to the date of visible beginning of improvement, such notice will not deprive the mortgagee of priority over the lien. M. E. Kraft Excavating and Grading Co. v. Barac Construction Co., 279 Minn. 278, 156 N.W.2d 748 (1968); Reuben E. Johnson Co. v. Phelps, 279 Minn. 107, 156 N.W.2d 247 (1968). A parallel argument to the one made here could have been made in those cases: a continuous transaction extends from an architect's preliminary plans to their realization in the construction of a building and, if a mortgagee has actual notice of this transaction before its mortgage is executed, then the mechanics lien should relate back to the date of actual notice. We rejected that result, holding that the mortgagee in those cases qualified as a mortgagee "without notice" under section 514.05 because that phrase refers to notice of existing liens.
Since no mortgage interest existed at the time Kump's mechanics lien attached in July 1978, we hold that Kump's lien takes priority over the bank's mortgage and accordingly reverse on this issue alone.
Our holding here should not have an adverse impact on the willingness of lenders to finance home construction. If, upon inspection of the property at the time of closing, it is evident that actual and visible improvement on the ground has begun, the lender can negotiate for a position of priority before executing the mortgage.
Affirmed in part; reversed in part.
NOTES
[1]  The evidence included an itemized list of building materials constituting the original estimate and a voluminous ledger representing materials actually delivered as revealed by delivery invoices. Illegible handwriting and inconsistent descriptions and quantities of items make it impossible to correlate the two exhibits and determine to what extent the construction cost increase was caused by price increases, under-estimation of quantities needed and modifications in the original plans.
[2]  The value of the lien is obtained by adding the cost estimate ($20,626.60) and the cost of extras ($8,534.00) and subtracting the undisputed amount of payments made ($7,447.28).
[3]  Section 514.05 provides in pertinent part:

All such liens, as against the owner of the land, shall attach and take effect from the time the first item of material or labor is furnished upon the premises for the beginning of the improvement, and shall be preferred to any mortgage or other encumbrance not then of record, unless the lienholder had actual notice thereof.
