
226 Kan. 619 (1979)
602 P.2d 1299
FIRST NATIONAL BANK OF OLATHE, KANSAS, Appellee,
v.
DONALD C. CLARK, et al., Appellants.
No. 49,909
Supreme Court of Kansas.
Opinion filed December 1, 1979.
Richard L. Reid, of Kansas City, argued the cause and was on the brief for the appellants.
T. Bradley Manson, of Overland Park, argued the cause, and Bruce F. Landeck, *620 of Lowe, Terry & Roberts, of Olathe, and Chris W. Henry, of the Law Offices of Robert D. Loughbom, of Kansas City, were with him on the brief for the appellee.
The opinion of the court was delivered by
HERD, J.:
This is a mortgage foreclosure action brought by First National Bank of Olathe against Donald C. and Terry J. Clark of Bonner Springs. The trial court granted judgment to the bank and the Clarks appeal. We affirm.
Appellants, Donald C. and Terry J. Clark, own and operate Double D Meats, a packing plant, which is located on a five-acre tract with the family home in Bonner Springs. On May 16, 1973, appellants borrowed $52,000.00 from appellee First National Bank of Olathe. They executed a promissory note and security agreement giving the bank a security interest in the packing plant and the home as well as "all furniture, fixtures, machinery, tools and other equipment now owned or hereafter acquired by debtor." The security agreement was duly filed of record in Wyandotte County and the loan proceeds disbursed.
The note provides for 120 monthly payments of $628.33 each. The total pay out is $75,400.00 on the $52,000.00 loan. The Clarks made 31 payments according to the tenor of the note then ran into financial problems because of Mr. Clark's health and the closing of an access road to the packing plant. Appellants made their last payment January 9, 1976, and after a few months' delinquency, the bank made demand on the Clarks. The bank received no response and thereafter, filed suit to foreclose the mortgage.
After the suit was filed, the Clarks answered admitting they borrowed the $52,000.00 and gave the mortgage to secure the debt but denied the debt was delinquent. They filed a counterclaim, alleging the suit was prematurely filed because by their computations the note was not yet due. They further alleged malicious abuse of process, requested damages in excess of $10,000.00, and demanded a jury trial. The trial court denied the demand for a jury and tried the case, rendering judgment for the bank in the amount prayed for. The Clarks appeal.
Appellants claim they are entitled to a trial by jury on the questions of fact surrounding the execution of the note. They allege although a mortgage foreclosure action is equitable in nature it is an equitable proceeding only where the court orders a certain piece of property sold to satisfy the debt. Appellants contend the actual determination of that indebtedness is an action *621 in contract, which is considered a legal proceeding. Appellants argue they signed a note to borrow money at an interest rate of 4.5% and that additional writing, placed there at a later time, materially altered the note from the one they signed. They conclude they are entitled to a jury determination of the fact question of terms added to a contract after its execution.
Appellants also claim they are entitled to a jury trial to resolve the following questions: (a) whether there was an agreement to renew their working capital loan, which was subsequently breached by the bank; (b) whether there was an agreement for a moratorium of payments during the access road construction and whether that agreement was breached by the bank; (c) whether the bank's actions with respect to these agreements constitute an abuse of process and intentional interference with the Clarks' business.
Appellants maintain the three issues, raised in their counterclaim, are "strictly legal in nature," because they demand money damages and are triable to a jury at common law. They contend the three issues are compulsory counterclaims pursuant to K.S.A. 60-213(a), and must be pled in response to a claim, or a party is later barred from bringing an independent action on the counterclaim. Stock v. Nordhus, 216 Kan. 779, 533 P.2d 1324 (1975).
Appellants contend they are entitled to a jury trial although the legal issues contained in the counterclaim are incidental to equitable issues. In support of this position, they rely upon the cases of Dairy Queen v. Wood, 369 U.S. 469, 8 L.Ed.2d 44, 82 S.Ct. 894 (1962), and Beacon Theatres v. Westover, 359 U.S. 500, 3 L.Ed.2d 988, 79 S.Ct. 948 (1959). Before proceeding with the specific points raised by appellant we must first consider the right to trial by jury.
The Seventh Amendment of the U.S. Constitution provides: "In suits at common law, where the value in controversy shall exceed twenty dollars, the right of trial by jury shall be preserved, ...." This amendment was implemented by Fed. R. Civ. P. 38(a), which states:
"The right of trial by jury as declared by the Seventh Amendment to the Constitution or as given by a statute of the United States shall be preserved to the parties inviolate."
Beacon Theatres v. Westover marked a sharp departure from the rule that a court sitting in equity could retain jurisdiction and decide the entire case even though a legal remedy became available *622 to decide the issue. Beacon Theatres held where both legal and equitable issues are present in a single case,
"only under the most imperative circumstances, circumstances which in view of the flexible procedures of the Federal Rules we cannot now anticipate, can the right to a jury trial of legal issues be lost through prior determination of equitable claims." Beacon Theatres v. Westover, 359 U.S. at 510-11.
The case requires when a legal issue is raised in an action begun as an equitable proceeding, a jury trial must ensue on that issue. Dairy Queen v. Wood followed Beacon Theatres, and held although legal issues are incidental to equitable issues, the right to trial by jury is preserved on those legal claims. See also 9 Wright and Miller, Federal Practice and Procedure: Civil § 2302, pp. 17-22 (1971).
The Kansas constitutional provision states, "The right of trial by jury shall be inviolate." Kan. Const. Bill of Rights, § 5. K.S.A. 60-238(a) provides:
"The right of trial by jury as declared by section 5 of the bill of rights in the Kansas constitution, and as given by a statute of the state shall be preserved to the parties inviolate."
The Seventh Amendment has not yet been made applicable to the states through the Fourteenth Amendment. Colgrove v. Battin, 413 U.S. 149, 169, n. 4, 37 L.Ed.2d 522, 93 S.Ct. 2448 (1973); Walker v. Sauvinet, 92 U.S. 90, 23 L.Ed. 678 (1876). Each state is, therefore, left to apply its own constitutional provision regarding the right to trial by jury. This distinction has not received strong clarification in Kansas cases and we note some inconsistent statements in this regard. In Hindman v. Shepard, 205 Kan. 207, 468 P.2d 103 (1970), cert. denied 401 U.S. 928 (1971), we indicated the federal and state right to trial by jury might be viewed identically, but stated:
"A civil litigant's constitutional right to trial by jury (Constitution of Kansas, Bill of Rights, § 5, and U.S. Constitution, Amendment 7) is predicated on whether the action at common law was one of law or in equity." (pp. 215-16)
See also In re Rome, 218 Kan. 198, 542 P.2d 676 (1975); Hornback v. Missouri-Kansas-Texas Rld. Co., 193 Kan. 395, 395 P.2d 379 (1964) (dissenting opinion); Windholz v. Willis, 1 Kan. App.2d 683, 573 P.2d 1100 (1977). Notwithstanding these cases, Kansas has never clearly adopted the line of federal cases construing the right to a jury trial under the U.S. Constitution.
We hold a determination of a party litigant's right to jury trial, guaranteed by the Kansas Constitution, is not required on legal *623 issues arising in a proceeding essentially equitable in nature, and decline to follow the holdings in Dairy Queen v. Wood and Beacon Theatres v. Westover.
Turning to the specific points on appeal, we recognize appellant's counterclaims are legal in nature. The subject matter of issue (a) did not arise out of the transaction which is the subject of this suit. The issue involves actions of the bank with respect to a different note signed by the Clarks which is not the subject of this action. Issue (b) arises out of the note in question and issue (c) seeks damages because of the bank's actions with respect to both notes. Whether a counterclaim containing legal issues is compulsory or permissive, however, does not per se entitle a party to a jury trial. We have stated, "In determining whether an action is one in equity the test is whether the essential nature of the action is grounded on equitable rights and is one in which equitable relief is sought." Karnes Enterprises, Inc. v. Quan, 221 Kan. 596, 600, 561 P.2d 825 (1977).
After considering the pleadings, including the issues raised in appellants' counterclaims, we find the proceeding is a mortgage foreclosure action which is equitable in nature. Karnes Enterprises, Inc. v. Quan, 221 Kan. 596; Hill v. Hill, 185 Kan. 389, 345 P.2d 1015 (1959); Federal Land Bank v. Butz, 156 Kan. 662, 135 P.2d 883 (1943); Union State Bank v. Chapman, 124 Kan. 315, 259 Pac. 681 (1927). The existence of legal claims does not alter the essential nature of the action. The trial court did not err in denying appellants a jury trial on either the questions of fact surrounding the execution of the note or the legal issues raised in the counterclaim.
Appellants argue the note here in contention is ambiguous, and as it was prepared by the bank, it was error not to construe the ambiguities against the bank. We recognize this is a pertinent rule of construction of written contracts; however, it is to be applied only where "after the ordinary rules of construction have been applied, the agreement is still ambiguous. The rule does not justify the taking or adopting of an isolated clause in dispute without examining the entire contract, the relations of the parties, their intention, and the circumstances under which they executed the contract." 17 Am.Jur.2d, Contracts § 276, p. 691.
The rules of construction with respect to written contracts are well established in Kansas.

*624 "In placing a construction on a written instrument reasonable rather than unreasonable interpretations are favored by the law. Results which vitiate the purpose or reduce the terms of the contract to an absurdity should be avoided. The meaning of a contract should always be ascertained by a consideration of all the pertinent provisions and never be determined by critical analysis of a single or isolated provision. (Tate v. Stanolind Oil & Gas Co., 172 Kan. 351, 240 P.2d 465; Brooks v. Mull, 147 Kan. 740, 78 P.2d 879; and Heckard v. Park, 164 Kan. 216, 188 P.2d 926.) It is not the province of the court to make contracts for the parties. Its function is confined to an interpretation of the contract which the parties have entered into. Every presumption is in favor of the legality of a contract rather than its illegality. (Mosher v. Kansas Coop. Wheat Mkt. Ass'n., 136 Kan. 269, 15 P.2d 421; and Geier v. Eagle-Cherokee Coal Mining Co., 181 Kan. 567, 313 P.2d 731.)
"Prior to a resort to extrinsic evidence, the instrument is to be interpreted from its `four corners.' That is to say, all the language used anywhere in the instrument should be taken into consideration and construed in harmony with other portions of the instrument. (Skelly Oil Co. v. Cities Service Oil Co., 160 Kan. 226, 231, 160 P.2d 246; Heckard v. Park, supra; and Smith v. Russ, 184 Kan. 773, 339 P.2d 286.)" Weiner v. Wilshire Oil Co., 192 Kan. 490, 496, 389 P.2d 803 (1964).
"The language in a contract is ambiguous when the words used to express the meaning and intention of the parties are insufficient in a sense the contract may be understood to reach two or more possible meanings." Wood v. Hatcher, 199 Kan. 238, 242, 428 P.2d 799 (1967); see Seute v. American Oil Co., 225 Kan. 640, 594 P.2d 156 (1979); Quenzer v. Quenzer, 225 Kan. 83, 587 P.2d 880 (1978). "If a written contract is actually ambiguous concerning a specific matter in the agreement, facts and circumstances existing prior to and contemporaneously with its execution are competent to clarify the intent and purpose of the contract in that regard, but not for the purpose of varying and nullifying its clear and positive provisions." Weiner v. Wilshire Oil Co., 192 Kan. at 496. Robertson v. McCune, 205 Kan. 696, 699, 472 P.2d 215 (1970).
One final rule of construction must be noted here. In construing an ambiguous or indefinite contract, the court "may also take into consideration the interpretation placed upon the contract by the parties themselves. [Citation omitted.] If the parties have by their conduct placed an interpretation on an ambiguous contract it will be followed by the court, if not inconsistent with the language of the contract. [Citations omitted.]." Mosher v. Kansas Coop. Wheat Mkt. Ass'n., 136 Kan. 269, 274, 15 P.2d 421 (1932).
Applying those rules of construction to the contract before us, we find, as did the trial court, that the contract is ambiguous. At the top of the note, the interest rate is marked 4.5%. At the bottom, it is 8.3%. The trial court properly permitted the introduction of parol evidence to explain the ambiguities. The appellee's witness, Mr. Finney, the former vice-president and first vice-president of the bank, testified the rate at the top of the note is the "add on" rate. The 8.3% rate, at the bottom of the note, is an error and should have read 7.9%. Finney admitted the error. The statement *625 of finance charges, however, written on the face of the note are correct and the monthly payment was correctly figured.
The trial court made the following findings regarding the ambiguity in the note:
"13. Defendants Clark admit that they signed the combination promissory note and security agreement described in plaintiff's petition, on May 16, 1973, but allege that said note was not filled out. No complaint was made about any omissions in the note until after this suit was filed. Instead the defendants made payments on the note, after its execution."
The trial court further concluded the Clarks were not prejudiced by the plaintiff bank's computation of interest in the amount of $23,400.00.
The Clarks made 31 payments on the note over a period of almost three years. No error in the terms of the note was contested by the Clarks during that period of time. The actions of the Clarks evidence their understanding that the note was computed at the proper rate of 7.9%. They made their payments, and the payments were properly credited to their account. The intent and purpose of the terms of the contract are clear. It would be absurd to allow the Clarks to capitalize on the bank's typographical error in this instance. They were not prejudiced in any way by the error. This issue is without merit.
Appellants' final issue concerns the applicability of the interest computation formula known as the rule of 78's. Appellants contend there is no statutory authority for the application of this rule. This is an erroneous argument. K.S.A. 1978 Supp. 16-205(b)(2)(i) provides:
"(2) Judgments upon precomputed interest-bearing contracts shall provide: (i) The unpaid principal balance shall be ascertained by deducting from the remaining total of payments owed on the contract that portion of the precomputed finance charges that are unearned as of the date of acceleration of the maturity of the contract, as provided in K.S.A. 16a-2-510 for computing the unearned portion of precomputed finance charges in the event of prepayment in full."
K.S.A. 16a-2-510(3) and (4)(a) contains the formula for the rule of 78's. There is ample statutory authority authorizing the use of the rule of 78's to compute the amount of unearned finance charge on the note. The point is without merit.
The judgment of the trial court is affirmed.
FROMME, J., not participating.
MILLER, J., concurring in result.
