delivered the opinion of the court.
The record discloses the following facts, the controverted part being amply supported by the evidence: On July 3,1914, defendant W. H. Misz, acting in behalf *609of Ms wife, the other defendant, purchased a tract of 5.64 acres of land, with a house and other buildings thereon, situated at Wilsonville, Clackamas County, •Oregon. Upon this property the plaintiff Butson held a mortgage in the sum of $2,500, executed April 12, •1911, by one Cook and his wife, who purchased the land from plaintiff. The mortgage was given -to secure two notes, one for $1,000, and the other for $1,500, due thereafter in five and ten years, respectively. The Cooks conveyed the property to one Adams, who deeded the same to defendant W. H. Misz, subject to plaintiff’s mortgage. Prior to the time Mr. Misz bought the land he met the plaintiff at Wilson-ville and informed him he was about to trade for the property. Butson told Mm he would give him three days to pay the two years’ delinquent taxes on the premises, and complained that the buildings had run down, and if the taxes were not so paid he would place the mortgage in the hands of his attorney for foreclosure. In about a week, the taxes not having been liquidated, plaintiff made arrangements with his attorney to foreclose the mortgage. A short time afterward Mr. Misz went to Butson and informed him that he had made the deal, but plaintiff told him he was too late; that his attorney had the matter for collection. In order that the deal might not be thwarted, negotiations were entered into to settle the controversy, pay the delinquent taxes, and stop the threatened foreclosure of the mortgage. In order to effect this adjustment, Misz agreed to pay the delinquent taxes, pay the plaintiff’s attorney his charges in the matter, and take out insurance on the house in Ms own name, payable to Butson as mortgagee. To this plaintiff assented, and Misz paid the taxes and expenses amounting to $48.48, and agreed to send the policy of *610insurance to Butson. Plaintiff’s evidence as to this contract is corroborated by his wife and attorney, and is not successfully refuted. Plaintiff afterward allowed a policy of $200, which he had on the dwelling-house payable to himself, to lapse. The title to the property was first conveyed to Mr. Misz and afterward he deeded the same to his wife ,who was the equitable owner thereof. On October 8, 1914, Misz procured a policy of insurance on the dwelling-house in the sum of $700, payable to Mrs. Misz. Butson never saw the policy, and in fact could not read nor write. He inquired of defendant about the insurance policy and was told by him that he had it all right in his safety box. Butson states that he trusted Mr. Misz in the matter. On March 29, 1915, the insured building was consumed by fire and plaintiff demanded the insurance money which defendants collected. A compromise agreement that defendants would pay plaintiff $200 and build another house on the land was effected, but never carried out by the former, a circumstance which does not affect this suit except to explain why defendants were permitted to collect the insurance. Plaintiff’s mortgage contained no covenant that the mortgagor should insure the building nor for the payment of taxes. No interest was due on the mortgage at the time Mr. Misz purchased the property.
1. It is contended on behalf of defendants that the agreement of Misz to insure the dwelling and make the policy payable to the mortgagee, if made, was not supported by any consideration, for the reason that no condition of the mortgage had been broken at the time of the contemplated foreclosure when Misz negotiated for the real estate, and that plaintiff had no right to foreclose the mortgage and no cause of suit to settle.
*611A compromise and settlement of a bona fide controversy between the parties, where each having equal knowledge or equal means of knowledge of the facts in good faith claims a right in himslf against the other, and which claim the parties consider good or doubtful, constitutes a valid binding agreement, and is a sufficient consideration to support a new contract, even though the law and facts were such that a court would not have. adjudged such an adjustment: Smith v. Farra, 21 Or. 395 (28 Pac. 241, 20 L. R. A. 115); Thayer v. Buchanan, 46 Or. 106, 111 (79 Pac. 343); Roane v. Union Pac. Life Ins. Co., 67 Or. 264 (135 Pac. 892); McGlynn v. Scott, 4 N. D. 18 (58 N. W. 460). A . new contract based upon such a consideration will be enforced in equity: 2 Pom. Eq. Juris. (3 ed.), §' 850.
2. Consideration is defined as a benefit to the party promising or a loss or detriment to the party to whom the promise is made: 9 Cyc. 308; Visalia Gas Co. v. Sims, 104 Cal. 326 (37 Pac. 1042, 43 Am. St. Rep. 105).
The plaintiff in good faith claimed the right to foreclose his mortgage. Both the parties appeared to have believed that it contained a covenant for the payment of taxes on the land, and that its condition had been broken at the time they made the new agreement. Having an abstract of title of the premises, neither examined the mortgage or record thereof. Butson had paid the taxes which were in arrears, and to that extent his demand was valid. Whether the mortgage was then due or not the court will not inquire. The parties have settled that matter between themselves in so far as the new contract is concerned. That the policy of insurance should be made payable to the mortgagee as his interest might appear was the reasonable and usual method of underwriting a building with an encumbrance. Defendants were not deceived *612nor overreached by plaintiff in any manner. The law favors a voluntary settlement of disputes to the end that the energies of the parties may be exercised in the affairs of life other than litigation.
There can be no question but that defendants, purchasing the real estate upon which plaintiff held a mortgage of $2,500 and against which property there were unpaid delinquent taxes, gained an advantageous position by settling the matter, when a foreclosure of the mortgage was .threatened, which was refrained from by the mortgagee. A contract based upon such a settlement did not lack a consideration. When the equities are otherwise all in favor of the enforcement of such a stipulation and it is necessary in order to preserve the security of plaintiff’s mortgage that an equitable lien upon the insurance fund be declared, a court of equity should lend its aid in the enforcement of the covenant and declare the amount of the policy of insurance which has been collected by defendants to be held in trust for the plaintiff: 19 Cyc. 885; Nordyke v. Gery, 112 Ind. 535 (13 N. E. 683, 2 Am. St. Rep. 219).
3. Where a mortgagor is bound either by covenants in the mortgage or otherwise, for example, by a valid verbal agreement to keep the property insured as a further security for the payment of the mortgage debt, then the mortgagee is entitled to an equitable lien upon the money due on the insurance policy, even though the policy is made payable to the mortgagor; and the proceeds when collected by such mortgagor are held in trust for the benefit of the mortgagee: Swearingen v. Hartford Ins. Co., 52 S. C. 309, 316 (29 S. E. 722); Nichols v. Baxter, 5 R. I. 491; Wheeler v. Insurance Co., 101 U. S. 439, 442 (25 L. Ed. 1055); Cromwell v. Brooklyn Fire Ins. Co., 44 N. Y. 42 (4 Am. Rep. 641); *613Nordyke v. Gery, 112 Ind. 535 (13 N. E. 683, 2 Am. St. Rep. 219); Chipman v. Carroll, 53 Kan. 163 (35 Pac. 1109, 25 L. R. A. 305); Hazard v. Draper, 7 Allen (89 Mass.), 267.
4. Counsel for defendants urge that no amount of insurance was fixed by the agreement. It would be understood ordinarily by such a promise that the usual and proper amount of a policy upon the building was intended by the parties. They may not have known at the time the proper figures.
5. However, there is no difficulty upon that score as the amount of the insurance policy was fixed and determined when the same was written. A clause making the same payable to the mortgagee as his interest might appear should have been inserted in the instrument in accordance with the stipulation between plaintiff and defendants. Equity will treat the document as having been so framed. This is upon the principle that equity treats that as done which should have been done: Nordyke v. Gery, 112 Ind. 535 (13 N. E. 683, 2 Am. St. Rep. 219).
6. Defendants’ counsel challenges the jurisdiction of a court of equity in the premises upon the ground that plaintiff’s remedy was at law. He was entitled to have this specific fund held intact for him. The trial court required the defendants to pay the money into court to await the final determination of the cause. An action at law would not afford plaintiff an adequate remedy. In order to fully protect his rights, equity has jurisdiction and is an appropriate proceeding: So. Portland Land Co. v. Hunger, 36 Or. 457 (54 Pac. 815, 60 Pac. 5); Benson v. Keller, 37 Or. 120, 127 (60 Pac. 918); Livesley v. Johnston, 45 Or. 30 (76 Pac. 13, 946, 106 Am. St. Rep. 647, 65 L. R. A. 783); *614Hall v. Dunn, 52 Or. 475, 479 (97 Pac. 811, 25 L. R. A. (N. S.) 193).
The decree of the lower court was right, and should be affirmed, and it is so ordered. Affirmed.
Mr. Chief Justice Moore, Mr. Justice Benson and Mr. Justice Harris concur. ■ '