
132 N.W.2d 386 (1965)
Helen CHRISTIANSEN, Plaintiff and Respondent,
v.
Walter M. STRAND, Defendant and Appellant.
No. 10147.
Supreme Court of South Dakota.
January 20, 1965.
*387 George W. Wuest, Tinan, Carlson & Wuest, Mitchell, for defendant and appellant.
John W. Larson, Kennebec, for plaintiff and respondent.
RENTTO, Judge.
Plaintiff and defendant are joint purchasers of a 5,125 acre ranch in Lyman County, South Dakota, under a contract for deed. The defendant defaulted in his payments thereunder. The plaintiff after making such payments on his behalf, pursuant to a prior agreement of the parties, brought this action to have defendant's interest under the contract impressed with an equitable lien in her favor and asking its foreclosure. From a judgment granting plaintiff the requested relief defendant appeals.
On August 23, 1958, the defendant had entered into a contract to purchase this ranch from the owner, Clarence Lindley, for a consideration of $153,750 to be paid in installments on March 1st of each year. On the execution of the contract he paid the down payment of $5,000 and on March 1, 1959, he paid the 1959 annual installment of $15,000 plus interest at 4% per annum on the unpaid balance. He failed to pay the installment due on March 1, 1960. With the contract in default, Lindley engaged counsel and took steps to foreclose it. In an effort to refinance the purchase, defendant and his counsel, not the one who now appears for him, entered into negotiations with the plaintiff.
On October 6, 1960 these culminated in an understanding between plaintiff and defendant under which plaintiff paid to Lindley the 1960 annual installment in default with interest amounting to $21,837.47. Their arrangement was that she would then have an interest in the purchase equal to his. Plaintiff also paid Lindley $1,000 for legal expenses incurred as a result of Strand's default and $1,900 to Lyman County, being the taxes then due on the property. In consideration of these payments Lindley entered into a new contract for the sale of the ranch property to plaintiff and defendant as purchasers, each to have an undivided one-half ownership thereof. The terms were the same as in the original contract and credit was given on the purchase price for the down payment and annual installments paid on the principal by the parties. These amounted to $35,000.
*388 On the same day the parties entered into this writing prepared by defendant's counsel, which is in the record as Exhibit B:
"PLEDGE
"In consideration of amount paid for taxes for me on this date in the amount of $1,900.00 or thereabouts, and also $1000 additional on check to Clarence Lindley this date, I agree to repay to Helen Christiansen said sum of money, plus interest at the legal rate from this date until paid. It is also agreed that if I default in any payments due from me on the real estate contract with Lindley, for either principal or interest or insurance at any time, it is agreed that Helen Christiansen may pay the same, and I agree to repay her together with interest, and for the amounts so advanced by her she shall have a lien on my interest in the real estate covered by the real estate contract which may be enforced by the Courts. If she does advance such funds and I do not repay her by December 1st, 1961, she shall be entitled to possession of the property involved, and it is understood by December 1st, 1962 I will repay her any sums which she may have advanced, and as security for such payment I pledge my interest in the contract hereto attached and real estate therein described.
              /s/ Walter M. Strand
              /s/ Helen Christiansen"
The two amounts specified in this agreement were later repaid to plaintiff by the defendant. Apparently he paid the sums due from him under the contract for deed in 1961 including interest and taxes, but not for the years 1962 or 1963. As to the payments due in 1962 and 1963 plaintiff paid her share and also that of the defendant. They are the only payments involved in this action.
The court determined that by reason of these payments defendant owed plaintiff the sum of $20,148.23 together with interest. Judgment was entered for this amount. It also decreed that she had an equitable lien against his one-half interest in the contract for deed that they had with Lindley to secure the repayment of funds advanced by her in payment of the obligation imposed on him by the contract and authorized its foreclosure in the manner provided by SDC 1960 Supp.Ch. 37.33. Defendant does not question the court's determination of the amount he owed plaintiff, but he does challenge the propriety of impressing his interest under the contract with an equitable lien in her favor.
He contends that the equitable lien which he agreed to in Exhibit B is confined by the phrase "If she does advance such funds and I do not repay her by December 1st, 1961". He claims that this specific language limits the lien to payments which he was obligated to make prior to that date. These are the two amounts mentioned in the exhibit and the 1961 principal and interest paymentwhich he paid himself. From this basis he urges that no equitable lien could arise by reason of the 1962 and 1963 payments.
His position on this is that the general statement in Exhibit B "that if I default in any payments due from me on the real estate contract with Lindley, for either principal or interest or insurance at any time, it is agreed that Helen Christiansen may pay the same, and I agree to repay her together with interest, and for the amounts so advanced by her she shall have a lien on my interest in the real estate covered by the real estate contract which may be enforced by the Courts" is limited by the specific provision above quoted. Over defendant's objection that it violated the parol evidence rule the court heard testimony as to what the parties meant in this writing. The admission of such testimony is assigned as error.
With us the rule that parol or extrinsic evidence may not be admitted to vary the terms of a written instrument is of statutory origin. SDC 10.0604. However, *389 when the writing is uncertain or ambiguous such evidence is admissible to explain the instrument, but it is not admissible to add to or detract from the writing. D. M. Osborne & Co. v. Stringham, 1 S.D. 406, 47 N.W. 408; Marso v. Heck, 50 S.D. 332, 210 N.W. 153. In other words, evidence is resorted to where the ambiguity may be dispelled to show what they meant by what they said, but not to show that the parties meant something other than what they said.
That the writing is ambiguous is obvious. In view of the circumstances surrounding the execution of Exhibit B and the testimony as to the intention of the parties the court concluded that both parties intended a lien for the protection of the plaintiff for any and all payments necessarily advanced by her for the defendant in connection with the Lindley contract. This the contract clearly states. In construing the dates mentioned therein as referring to liens for payments made by plaintiff before these dates, but not denying the same for payments made thereafter, the court gave reasonable effect to all provisions of the writing. When this can be done both the general and the special provisions should be retained. 17A C.J.S. Contracts § 313.
It is well established in this state that equitable liens may be created by agreement of the parties. Savings Bank of Hartford v. Mundt, 47 S.D. 161, 197 N.W. 156; Dorman v. Crooks State Bank, 55 S.D. 209, 225 N.W. 661, 64 A.L.R. 614. These cases are also authority for the proposition that the one claiming such lien has the burden of establishing it by clear and convincing evidence. Whether the evidence in a case satisfies that requirement is in the first instance determined by the trial court and we may not disturb that determination unless we can say that the clear preponderance of the evidence is against it. Brown v. Warner, 78 S.D. 647, 107 N.W.2d 1. We have examined the entire record with care and are of the view that the trial court's construction of the contract and its award of an equitable lien for the 1962 and 1963 payments are warranted and justified.
In his amended answer the defendant alleged items to the extent of $5,212.50 as a counterclaim. These intermingled claims that defendant asserted against the plaintiff and her husband with claims against her individually. Generally speaking these were based on small improvements made by him to the ranch property and services rendered in caring and providing for cattle of the plaintiff and her husband, being pastured thereon. The latter constitute the major portion of the sum claimed. Plaintiff moved to dismiss the counterclaim as being one that was not permissible under our statute. SDC 1960 Supp. 33.0911. The granting of this motion is assigned and urged as error.
Clearly, so much of the counterclaim as involved claims against the plaintiff's husband was improper because he was not a party to this action. Defendant does not seriously question this. He does, however, claim that the remainder of the counterclaim asserted against her individually was proper. The record does not show that the trial judge determined the propriety of this portion of the counterclaim. In fact, it strongly indicates that he did not. But even assuming that they were items of a permissible counterclaim we do not feel that the trial court erred in declining to try them in this action. The dismissal is not an adjudication of the claims alleged therein.
While counterclaims in our modern systems of code pleading were designed to avoid as far as possible a multiplicity of suits between the parties, the trial court may still, under proper circumstances, order a separate trial of the issues raised thereby. SDC 1960 Supp. 33.0917 vests a discretion in the trial courts in the matter of separate trials of causes of action.
*390 Defendant does not attempt to show that the court's action was an abuse of the discretion with which it is vested. That is his burden. Rather he seems to claim only that the court had no choice in the matter if any of the items alleged were proper as a matter of counterclaim. We have reviewed the record carefully and are unable to find therein anything to indicate that the trial court abused its discretion. Absent such a showing we must assume that its action was prompted by valid reasons.
Affirmed.
All the Judges concur.
