
695 P.2d 467 (1985)
Miguel A. PEREZ-LIZANO, Plaintiff and Respondent,
v.
Milan R. AYERS, Defendant and Appellant.
No. 84-296.
Supreme Court of Montana.
Submitted January 23, 1985.
Decided February 15, 1985.
Dzivi, Conklin & Nybo, William Conklin argued, Great Falls, for defendant and appellant.
Alexander & Baucus, John Paul argued, Great Falls, for plaintiff and respondent.
SHEEHY, Justice.
Milan R. Ayers appeals the May 24, 1984 order of the Ninth Judicial District Court, Toole County, granting Miguel A. Perez-Lizano partial summary judgment in an action against Ayers to collect a $40,000 promissory note. The trial court judgment is affirmed.
Perez-Lizano and Ayers were in the business of developing oil and gas property. Sunlite International, Inc., of Houston, Texas, had acreage in Pondera and Teton *468 Counties, Montana available for development. Ayers told Perez-Lizano he was interested in purchasing an option on that acreage. Subsequently, a promissory note for $40,000 was signed by Ayers in favor of Perez-Lizano. A writing from Ayers to Perez-Lizano captioned "Letter Agreement" set forth information intended to supplement and clarify the note. Both instruments are dated December 15, 1980.
The promissory note provided for repayment to Perez-Lizano of the $40,000 one year from its date and stated that 10 percent per annum interest accrued from June 15, 1981 until repayment. The note also stated it would be secured by Ayers' 12 1/2 percent working interest in the "Aakre lease."
The "Letter Agreement" stated the purpose of the loan and Ayers' collateral. It also stated that:
"As compensation for the use of these funds, I will assign a 2% working interest, carried 100% on all costs through the four initial wells to be drilled on the acreage included under the Sunlite option. The funds will be repaid prior to any drilling activity on these properties. If use of the funds is required beyond seven months, a 10% annual interest rate will be added starting from June 15, 1981."
Perez-Lizano transferred $40,000 to Ayers  $20,000 by wire-transfer on January 23, 1981, and $20,000 by check deposited in Ayers' account at the First State Bank of Shelby, Montana on January 29, 1981. On Ayers' deposit slip for the January 29, 1981 bank transaction there is a handwritten notation "Miguel Perez-Lizano (loan)."
There was no compliance with the terms of either the note or the "Letter Agreement." Ayers did not secure the loan with the proposed 12 1/2 percent working interest in the "Aakre lease," he did not assign a 2 percent working interest as compensation to Perez-Lizano for his use of the funds, and he paid no interest to Perez-Lizano. No part of the $40,000 has been repaid.
Ayers alleges that the letter agreement and promissory note do not set forth the real agreement between the parties. He claims the $40,000 Perez-Lizano advanced to him was Perez-Lizano's investment in the Sunlite option property and it was never either party's intention that Ayers would repay Perez-Lizano. Ayers claims the note and the letter agreement were a sham to help Perez-Lizano obtain investment funds from third parties. The trial judge, relying on the parol evidence rule, refused to admit Ayers' evidence concerning these allegations.
Perez-Lizano sued Ayers on December 22, 1981, seeking collection of the promissory note and damages for fraudulent misrepresentation. In his December 29, 1981 answer, Ayers admitted executing the promissory note but denied that the note and letter agreement represented the entire agreement between the parties. He did not plead fraud in his answer. On February 21, 1984, following discovery and a pretrial conference, Perez-Lizano filed a motion for partial summary judgment for the amount of the promissory note and attorney's fees. On March 1, 1984, Ayers filed a motion for leave to file an amended answer and counterclaim. The amended answer pleaded fraud in another matter as a counterclaim but did not plead the defense of fraud to the note here. A hearing on those motions was held on March 8, 1984.
Ayers offered Exhibit D in support of his contentions which exhibit contains the following language:
"The $40,000 in the Sunlite option  to be returned when the deal was financed. For sure I want to return Terrial's $20,000. The remaining $20,000, I will return to fund the Alstead. I hope this takes place within 30 days."
On March 27, 1984, the trial judge granted Perez-Lizano's motion for partial summary judgment. On May 24, 1984, the trial judge denied Ayers' motion to amend his answer and assert his counterclaims. The trial judge entered findings of fact, conclusions of law, and judgment for Perez-Lizano in the amount of the promissory note, *469 interest, and attorney's fees. The judgment was certified as final for appeal purposes, pursuant to Rule 54(b), M.R.Civ.P.
The issue before us is whether the District Court correctly granted Perez-Lizano's motion for partial summary judgment. In granting that motion, the trial judge concluded that Ayers could not introduce parol evidence because the promissory note was clear and unambiguous on its face. Ayers appeals this, arguing he sought to prove with parol evidence that he had a defense against payment pursuant to § 30-3-306(b) and (c), MCA.
The defense Ayers claims is delivery for a special purpose. He argues oral evidence should have been admitted to establish that special purpose. As discussed below, Ayers asserts that Perez-Lizano was subject to the defenses available in § 30-3-306, MCA.
Two issues, both raised by appellant, are considered:
1. Was Perez-Lizano subject to the defenses listed in § 30-3-306, MCA?
2. Should the District Court have allowed parol evidence to establish a defense of delivery for a special purpose?

I.
Ayers argues that Perez-Lizano was not a holder in due course, and as such was subject to the defenses listed in § 30-3-306, MCA.
Section 30-3-302(2), MCA, provides that a payee may be a holder in due course. Such instances must indeed be rare because in § 30-3-305, MCA it is provided that a holder in due course takes the instrument free from all defenses of any party to the instrument with whom the holder has not dealt. To paraphrase, even if one is a holder in due course of an instrument, he is still subject to the defenses against the instrument of any party if he has dealt with that party. Thus in this case, Perez-Lizano, having dealt with Ayers in the issuance of and delivery of the instrument, takes the instrument subject to Ayers' defenses. The situation of this case is that if Ayers is not a holder in due course, under § 30-3-306, MCA, he takes the instrument subject to all defenses which Ayers would have in an action on a simple contract. On the other hand, if Ayers as payee is the holder of due course, he is still subject to those defenses because he dealt with Ayers, a party to the instrument, under the provisions of § 30-3-305, MCA.
Therefore, whether Ayers is a holder of the instrument, or a holder in due course, the issue is not dispositive. The single point on which this case turns is whether the court should have allowed parol evidence offered by Ayers to show that the real agreement between the parties was other than the one expressed in the note and in the letter of agreement.

II.
Ayers contends that by his offer of parol evidence he would establish the defense against the instrument of delivery for a special purpose. Under § 30-3-306(c), MCA, delivery of an instrument for a special purpose is a defense against the instrument against one not a holder in due course.
There are two principal reasons why Ayers cannot prevail on his contention that he should be allowed to present evidence of special purpose in this case. First, the special purpose defense under the UCC against instruments has been construed to apply only to those instruments which would be enforceable except for the occurrence of a condition. Secondly, under Montana's ordinary contract law, parol evidence is not admissible to show that a written instrument between parties is based on a sham or fraud.
Ayers contends that the letter agreement and promissory note do not set forth the entire transaction between the parties. In his third defense contained in his proposed amended answer, Ayers sought to elaborate his earlier allegations that the $40,000 advanced by Perez-Lizano to Ayers was Perez-Lizano's personal investment in the *470 Sunlite option property and was never intended to be a loan or to be repaid by Ayers. He further contends that the note and letter of agreement were executed as a sham and for the sole purpose of accommodating Perez-Lizano in his relationship to third parties from whom he had obtained investment funds.
Ayers' contentions do not embody the "special purpose" envisioned as a defense against an instrument under § 30-3-306(c), MCA. That provision is construed by courts as applying to instruments which except for the occurrence of a condition, would be enforceable. Some examples of delivery for a special purpose are:
1) Labar v. Cox (Tex. App. 1982), 635 S.W.2d 801. A note was executed on the condition that it was enforceable only if the payee received a bank loan because the note was to be collateral. The bank refused to make the loan. The court allowed parol evidence of delivery for a special purpose;
2) Ventures, Inc. v. Jones (1981), 101 Idaho 837, 623 P.2d 145. Notes were conditionally executed to be enforceable until a second mortgage was obtained. This, of course, is slightly different from a note becoming enforceable upon a condition but illustrates that delivery for a special purpose requires the parties to intend that the notes would be enforceable if a condition occurs; and
3) Schranz v. I.L. Grossman (1980), 90 Ill. App.3d 507, 45 Ill.Dec. 654, 412 N.E.2d 1378. An instrument was placed in escrow with a third party. The escrow agreement provided that the instrument could only be retrieved if default occurred on a different note. The Illinois Court held that placing the note in escrow was conditional delivery. Similarly, Johnson v. Bond (Tex.Civ.App. 1976), 540 S.W.2d 516.
In the present case Ayers' evidence does not relate to delivery for a special purpose. He is not trying to establish that enforceability of the negotiated instrument is predicated on the occurrence of some act or event. He wants to prove that the instrument is a sham, never intended to be enforceable. This is not delivery for a special purpose because under Ayers' contentions, the note and letter would never be an enforceable contract, but were a sham.
The modern trend of law is to allow evidence in civil cases based on the theory that justice is best served by resolving controversies on their merits, not by form or procedural technicalities. Nonetheless the parol evidence rule remains a viable rule of law and is applicable in this case.
This Court stated in West River Equipment Co. v. Holzworth Const. Co. (1959), 134 Mont. 582, 588, 335 P.2d 298, 302:
"The principle is well-established and of general application, subject to certain exceptions, that when a contract has been reduced to writing the contents of such writing cannot be added to, contradicted, altered, or varied by parol or extrinsic evidence, and that such writing supersedes all oral negotiations concerning its matter which preceded, accompanied, or led up to its execution. This was the rule at common law, and has been embodied in the statute law of this state." (Emphasis in original.)
Section 28-2-905, MCA, provides that when the terms of an agreement have been reduced to writing by the parties, it is to be considered as containing all the terms, and there can be no evidence of the terms of the agreement other than the contents of the writing except when a mistake or an imperfection of the writing, is at issue, or when the validity of the agreement is the fact in dispute.
The application of the parol evidence rule was considered by this Court in Higby v. Hooper (1950), 124 Mont. 331, 221 P.2d 1043 and again in a later case of Kinjerski v. Lamey (1979), 185 Mont. 111, 116, 604 P.2d 782, 785. In Higby, we said:
"Under certain circumstances, none of which is here present, a person may show that the document in question was intended to serve the purpose of a mere jest, joke or sham. `But a just policy would seem to concede this only when the pretense is a morally justifiable one *471 (as, to calm a lunatic or to console a dying person). When it is morally beyond sanction, or aims at an evasion of the law or a deception of other persons, by intention of the parties, that intention will not be given effect.' 9 Wigmore on Evidence, 3d Ed., sec. 2406, subd. (1), pp. 16, 17." (Emphasis in original.)
The District Court correctly excluded extrinsic evidence of a sham or fraudulent scheme offered to vary the terms of an unambiguous written contract.
Summary judgment in this case was proper. Ayers' assertion that there is a material question of fact about the fraudulent purpose of the contract is immaterial because even if his assertions are true, the extrinsic evidence would be inadmissible under the parol evidence rule.
Affirmed.
TURNAGE, C.J., and HARRISON, MORRISON, GULBRANDSON, WEBER and HUNT, JJ., concur.
