(February 3, 1900.)

#### BURKE LAND AND LIVESTOCK COMPANY v. WELLS, FARGO & CO.

[60 Pac. 87.]

(Extension or Mortgage — Estoppel.—The respondent corporation purchased from appellants all of the property then belonging to the appellant (the B. L. & C. Co.), and agreed to pay therefor $74,-048.68, that being the sum then due from the last-named corporation to appellant, Wells, Fargo & Co., and agreed that said purchase price was secured by two certain mortgages, executed by appellant, Burke Land and Cattle Company to Wells, Fargo *&*Company, on said property, and accompanied by possession of such property. *Held,*that although said mortgages were not originally given to secure all of said purchase price, the respondent is estop-ped from denying the validity of said mortgages as to any part of said purchase price.

Multiplicity op Suits. — The laws of this state prohibit the splitting of causes of action and a multiplicity of suits.

Equity — Jurisdiction.—A court of equity having obtained jurisdiction of a cause of action, for any purpose, may retain it for all purposes, and may determine all the matters in issue.

Construction op Contract. — In the construction of a written contract, if there is room for doubt as to its true meaning, the facts and circumstances out of which such contract arose should be considered, and the contract construed in the light of such circumstances.

Strangers. — When a person is largely indebted, and thereafter organizes a corporation, and has all of its capital stock issued to himself, except one share each to four persons, given by him to qualify them as directors, and then transfers all of his property to *43such corporation, and thereafter such corporation assumes the indebtedness of its creator and owner, one, a stranger, and not a •c’-cditor, of such corporation, will not be heard/ to complain thereof.

Principal and Agent. — When a contract is entered into by an agent, the principal cannot adopt part of the contract, and repudiate part, and enforce the part adopted.

Ultra Vires. — The doctrine of *ultra vires*should not be applied when it would defeat the ends of justice, or work a legal wrong.

(Syllabus by the court.)

APPEAL from District Court, Bingham County.

F. S. Dietrich and W. H. Dickson, for Appellants.

It is a well-settled rule that the courts, when called upon to construe contracts of parties and to interpret the language which they have employed to express their agreements, will, when there is any room for doubt, look to the circumstances which surrounded the parties at the time of entering into the agreement, and will read and construe the language employed by them in the light of these circumstances. *(Nash v. Towne, 5*Wall. (TJ. S.) 689; *Canal Co. v. Hill*15 Wall. (TJ. S.) 94; *Merriam v. United*States, 107 TJ. S. 437, 2 Sup. Ct. Bep. 536; *Thompson v. Mahay,*41 Cal. 221; *Saunders v. Clark,*29 Cal. 229; *Walsh v. Hill,*28 Cal. 481.) Parol evidence as to what the real consideration of the transfer of the property was is competent, even though it is inconsistent with the consideration expressed in the instrument of transfer. It is always permissible to show by parol what the true consideration of a deed or contract is. (2 Devlin on Deeds, secs. 823, 828, 830; *Frey v. Vanderhoof,*15 Wis. 398; *Mobile Bank v. McDonnell*89 Ala. 434, 18 Am. St. Eep. 137, 8 South. 137; *Thompson v. Cheeseman,*15 Utah, 43, 48 Pac. 477; *Drury v. Tremont Imp. Co.,*13 Allen, 168.) If one purchases land subject to a mortgage and there is a deduction from the purchase price or consideration on account thereof, and he verbally or by his deed agrees not only to take the land subject to the mortgage, but in consideration, in whole or in part, for the transfer, agrees to assume and pay the mortgage, he is not at liberty to deny the existence or validity of the mortgage, *44or dispute the amount owing thereunder at the time of the transfer. *(Hancock v. Fleming,*103 Ind. 535, 3 N. E. 254; 1 Jones on Mortgages, sec. 744; 2 Jones on Mortgages, sec. 1491; *Merryman v. Moore,*90 Pa. St. 78.) A court of equity haring obtained jurisdiction of a cause for any purpose, it will retain the cause for all purposes, and proceed to a final determination of all the matters at issue. (1 Pomeroy’s Equity Jurisprudence, secs. 181, 231, 232, 242; *First Nat. Bank*v. *Bews,*3 Idaho, 486, 31 Pac. 816.) It is submitted that by the weight of modern authority there is no implied prohibition of, nor is public policy violated by, corporate acts simply *ultra vires,*and therefore they are not illegal but merely voidable. (Beach on Private Corporations, see. 421. See, also, excellent discussion, see. 422; *Mining Co. v. Montana etc.,*89 Fed. 529; *Smith v. Ferries etc. By. Co.*(Cal.), 51 Pac. 710; *Fudickar v. Fast River Irr. Dist.,*109 Cal. 29, 41 Pac. 1024; *Boy v.*Scott, 1 Wash. 399, 39 Pac. 679.) The doctrine of *ultra vires,*when it is invoked for or against a corporation, should not be allowed where it would defeat the ends of justice or work a legal wrong. *(Bear River etc. v. Manley,*15 Utah, 506, 50 Pac. 611; *Railroad Co. v. McCarty,*96 U. S. 258; *Union Water Co. v. Murphy’s Flat Fluming Co.,*22 Cal. 621.)

Johnson & Johnson, Arthur Brown and W. T. Reeves, for Respondent, Burke Land and Livestock Company.

It is a cardinal rule in equity pleading that the *allegata*and *prohata*must agree. *(Green v. Covillaud,*10 Cal. 332, 70 Am. Dec. 725; *Murdock v. Clarke,*59 Cal. 693.) A party cannot be allowed to claim relief inconsistent with his pleading. *(Weil v. Porter,*77 Mo. 287; *Gregory v. Nelson,*41 Cal. 278; *Cummings v. Cummings,*75 Cal. 434, 17 Pac. 442; *Carpentier v. Brenham,*50 Cal. 549; *Burnett v. Stearns,*33 Cal. 468.) A finding is useless and idle, unless the facts found are within the issues; and a judgment based upon such facts cannot be sustained. *(Morenhout v. Barron,*42 Cal. 605; *Green v. Chandler,*54 Cal. 626; *Devoe v. Devoe,*51 Cal. 543.) No decree can be made in favor of a plaintiff on grounds not stated in his complaint, nor relief granted for matters not *45charged, although they may be apparent from some part of the pleadings and evidence. *(Kelsey v. Weston,*2 N. Y. 506; *Ferguson v. Ferguson,*2 N. Y. 360; *Baily v. Ryder,*10 N. Y. 363; *Thomas v. Austin,*4 Barb. 265; *New York Pro. Ins. Go. v. National Ins. Go.,*20 Barb. 473; *Truesdell v. Baríes,*104 N. Y. 167, 10 N. E. 139; *Rome Exchange Bank v. Fames,*1 *Keyes*(N. Y.), 588; *Wright v. Delafield,*25 N. Y. 266; *South-wick v. First Nat. Bank,*84 N. Y. 420.) In actions brought since the adoption of the code, it is a general rule that the nature of the action is to be determined by the prayer for relief; and that this rule may be safely adopted in cases of doubt, and in any cases where the pleader conceiving himself to be entitled to prosecute either of several actions has so stated his facts as to leave it uncertain which he intends to pursue. *(Gillett v. Treganm,*13 Wis. 472, 476; *Cobb v. Smith,*23 Wis. 265.) If the mortgagee advance only a part of the sum contemplated in the mortgage, it is a valid security for so much as he does advance, and for so much only. (1 Jones on Mortgages, sec. 378.) There is absolutely no evidence that $75,000 was deducted from the purchase price or any proposed purchase price, or of any other fact tending to show that the livestock company owes or has reserved or holds $75,000 of the purchase price of the property. *(Rapp v. Stoner,*104 Ill. 618; *Elliott v. Sackett,*108 IJ. S. 140, 2 Sup. Ct. Bep. 375; *Tanguay v. Felthousen,*45 Wis. 33; *Grane v. Hughes,*5 Kan. App. 100, 48 Pac. 866.) A recital of a mortgage in a deed may estop one claiming under it from denying its existence, or that there is such a mortgage; he further says that a recital in a deed that a mortgage exists does not estop the grantee from relying upon the defense that part of the mortgage has been paid. (2 Herman on Estoppel, sec. 613; *Briggs v. Seymour,*17 Wis. 255; *Thompson v. Morgan,*6 Minn. 292.) Section 3351 of the Revised Statutes provides that a mortgage can be created, renewed or extended only by writing executed with the formalities required in the case of a grant or conveyance of real property. *(London etc. Bank v. Bandmann,*120 Cal. 220, 65 Am. St. Rep. 179, 52 Pac. 583; *Porter v. Muller,*53 Cal. 677; *Clark v. Oman,*15 Gray, 522; *Bank of**46*Buffalo v. Thompson,*121 N. Y. 280, 24 N. E. 473.) Agents cannot make contracts with themselves so as to bind their principals. The law will not permit one who acts in a fiduciary capacity to deal with himself in his individual capacity. (1 Daniel on Negotiable Instruments, 282; Thompson on Corporations, secs. 4657, 4658, 4630; *Claftin v. Bank,*25 N. Y. 293; *Bank v. Glifford,*47 Iowa, 575; *Victor M. Go. v. National Bank,*15 Utah, 391, 49 Pac. 826, 828; *Wardell v. Railroad Go.,*103 U. S. 651; Mechem on Agency, secs. 455, 456; 1 Morawetz on Private Corporations, sec. 517; *McGourkey v. Railway,*146 U. S. 536, 13 Sup. Ct. Eep. 170; *Bear River Valley Orchard Go. v. Hanley,*15 Utah, 506, 50 Pac. 614; *People v. Township Board,*11 Mich. 222, 225.)

J. W. Eden, for Idaho National Bank,

cites no authorities.

SULLIVAN, J.

The respondent, the Burke Land and Livestock Company, an Illinois corporation, hereinafter referred to as the “Illinois corporation/’ brought this action against Wells, Fargo & Co., a Colorado corporation doing business in the state of Utah, and the Burke Land and Cattle Company, a Utah corporation, hereinafter referred to as the “Utah corporation,” to redeem certain property, real and personal, from the mortgages described in the complaint, alleging that said mortgages had been fully paid and satisfied. The prayer of the complaint is as follows: “Wherefore plaintiff prays and demands that the defendant be required to present his claim herein on said note, if any he has, and render to the plaintiff an account herein and hereof, and that an accounting be had between the plaintiff and the defendant, and that judgment be entered herein declaring said note fully paid, and that both said mortgages be surrendered and be canceled and satisfied of record, and that pending this action the plaintiff be put in the possession of said property, free from the interference of the defendants and all other persons, and for judgment for its costs, and for all general and proper relief in the premises.” Each defendant answered the complaint, and denied that said mortgages had been fully paid, and alleged *47that there remained due and unpaid tbereon the sum of $53,-515.72, together with interest. The defendant Wells, Fargo d Co. filed a cross-complaint by which it sought a foreclosure of said mortgages for the said sum, with interest from February 16, 1895, at the rate of eight per cent per annum' upon $11,122.92 thereof, and at the same rate from November 25, 1896, upon $26,500 thereof, and at the rate of ten per cent per annum upon $15,792.80 thereof from July 31, 1897, and for $1,000 attorney’s fees and costs, and prayed for general relief, as follows: “And for such other and further relief as to the court may seem meet and just.” By said cross-complaint, Howard Sebree and the Idaho National Bank of Pocatello were made parties. They appeared and answered, and each filed a cross-complaint, alleging liens upon the property involved, by virtue of attachments and judgments, and prayed that the priority of their liens be fixed by decree. Wells, Fargo & Co. answered the cross-complaint of Howard Sebree, and denied that its liens were subsequent or subject to those of said Sebree. The respondent filed an amended complaint, which contains many allegations contained in its original complaint, and some additional ones. The praj^er is as follows: “Wherefore the plaintiff demands judgment that the defendants, and each of them, be required to answer the complaint of the plaintiff herein, and to present by answer hereto a full, true, and itemized statement of all its claims and demands against said property of the plaintiff under said note and mortgages, of every name and nature; that an accounting be had between the plaintiff and defendants, and a balance struck between plaintiff and defendants; and that, should it be found in such accounting any portion of said promissory note remains unpaid, the plaintiff pay such balance into court for which of the defendants may be entitled thereto; and should, on the other hand, it be found that said note has been more than paid, that the defendant, Wells, Fargo *&*Co. be required to pay the balance into court to plaintiff; that the said note and mortgage may be canceled and discharged; that pending this suit, and until final decree had herein, a receiver may be appointed by this honorable court *48to take charge of all the said property, both personal and real, in controversy under said note and mortgages, under the orders and direction of the court; and that the defendant, its servants, agents, employees, and attorneys, may in the meantime be restrained and enjoined from taldng charge of said property, or any part thereof, or from in any manner meddling or interfering therewith; and for such other and further relief in the premises as to the court may seem meet and just.” The defendants, who are the appellants here, answered the amended complaint, and denied its material allegations. The pleadings cover eighty-two printed pages of the transcript.

The cause was tried by the court without a jury, and the court filed findings of fact numbered from 1 to 29, inclusive, and conclusions of law from 1 to 8, inclusive, and judgment and decree of foreclosure of said mortgages were entered thereon for the sum of $13,456.90, together with $1,000 attorney’s fees, and certain costs, in favor of Wells, Fargo & Co. and against the Illinois and Utah corporations, and judgment and decree, in favor of the Idaho National Bank of Pocatello, and against the Utah corporation, for the sum of $1,676.28, and judgment and decree, in favor of Howard Sebree against the Illinois corporation, for the sum of $15,222.20. Said amounts are adjudged to be liens upon the property described in the pleadings in favor of the respective parties, with priority in the order above stated. Judgment was also entered giving the possession of the property in dispute to the plaintiff. A motion for a new trial was interposed by the appellants, Wells, Fargo & Co. and the Utah corporation, and denied by the court. This appeal is from the judgment and order denying a new trial.

The transaction out of which the subject matter of this suit arose covered a considerable period of time, and the facts are somewhat complicated. It appears from the record that, prior to the year 1895, and prior to the organization of said Utah corporation, one William Burke, who was engaged in the land and cattle business, became largely indebted to divers persons, among whom was the appellant, Wells, Fargo & Co. Said Burke thereupon organized the. Burke Land and Cattle Company, un*49der the laws of the state of Utah, with a capital stock of one thousand shares, of the par value of $100 per share. Four of said shares were issued by his direction, and without consideration, to officers and employees of Wells, Fargo & Co., for the purpose of qualifying them as directors of said corporation. The other nine hundred and ninety-sis shares were issued to, and owned by, said William Burke. Thereupon, without any consideration, said Burke transferred and sold his lands, cattle, and other property (much of which is involved in this suit) to said Utah corporation, and also transferred said nine hundred and ninety-six shares of stock to Wells, Fargo & Co., as security for the payment of the personal indebtedness of said Burke to Wells, Fargo & Co., and to secure John E. Dooly, managing agent of said Wells, Fargo & Co., against any liability on account of what is referred to in the record as the ‘‘Buford-Croker judgment.” Afterward, on March 21, 1895, said Utah corporation, being indebted to Wells, Fargo & Co. in the sum of about $6,000 on overdraft account, and desiring to secure further advances from said company, executed its mortgages to Wells, Fargo & Co. on all of its said real estate, cattle, and other property, to secure the payment of a promissory note for $75,000. Each mortgage (real estate and chattel) on its face purports to have been given for $75,000. Thereafter, in November, 1895, said Burke not having paid the sums of money the payment of which was secured by the pledge of said nine hundred and ninety-six shares of stock, a formal pledgee’s sale of the same was made, at Salt Lake City, state of Utah, and said shares were bid in by, and sold to, Wells, Fargo & Co., through one George Brastow, for the sum of $26,500. There was an understanding between Wells, Fargo & Co. and William Burke that, on his paying to the former the amount due it from Burke and the Utah corporation, it would transfer said stock to Burke. The respondent corporation, the Burke Land and Livestock Company was organized under the laws of the state of Illinois, in the latter part of the year 1895, ostensibly for the purpose of purchasing all of the property of the Utah corporation. Its capital stock consisted of two thousand five hundred shares, of *50the par value of $100 each. Frank W. Burke and John L. Burke, sons of said William Burke, subscribed for one thousand shares each of said stock, and said William Burke, his brother,' James Burke, and John Brennoek, a relative, subscribed for the remaining five hundred shares of said stock. Said William Burke, his sons, brother, and relative, were the owners of all of the capital stock of said Illinois corporation. In regard to said capital stock, said Frank W. Burke testified as follows: “I gave nothing for the stock, only subscribed for it. Neither did my brother pay anything for his one thousand shares, and my father parted with nothing of value for his subscription, nor did the other subscribers." All of said stock was thus issued without any consideration whatever. Frank Burke further testified as follows: “I was not only nominally, but, as I understood it, in reality, the owner of two-fifths of the capital stock of the Illinois corporation at the time I came to Utah to open negotiations on behalf of that company looking to the transfer of the property of the Utah company to the Illinois company”; and that he regarded the property of the Utah corporation valuable, and worth from $100,000 to $130,000, and that he understood, if Wells, Fargo & Co. agreed to it, the Illinois corporation would get the property without any consideration except the payment of the debts of the Utah corporation; that' witness was authorized by the Illinois corporation to negotiate a transfer of all of the property of the Utah company to the Illinois corporation. Negotiations began for the purchase of said property some days before the fifteenth day of January, 1896. At a meeting of the board of directors of the Illinois corporation, held at Chicago, Illinois, on the fourth day of January, 1896, the following resolution was passed, appointing said Frank Burke agent of the Illinois corporation, to negotiate for the purchase from the Utah corporation of all of the real and personal property, of every kind and nature, owned by and belonging to the Utah company, to wit: “Resolved, by the board of directors of the Burke Land and Livestock Company, a corporation duly organized and existing under the laws of the state of Illinois, that Frank W. Burke be, and he is hereby, ap*51pointed the agent of this company to negotiate for the purchase from the Burke Land and Cattle Company, a corporation organized and existing under the laws of the territory of Utah, all of the real and personal property, of every kind and nature, owned by or belonging to said last-named company, and wheresoever situated, upon such terms and conditions as said attorney may see fit to agree upon, and subject to the debts or liabilities of said last-named company; hereby ratifying and confirming all things which said attorney may lawfully do by or under these presents. And, upon motion duly made and seconded, it was further resolved that Frank W. Burke be, and the same is hereby, appointed agent of this company, to take charge of, look after, manage, and control the business of this company. And, upon motion duly made and seconded and carried, the meeting adjourned without day.”

At a meeting of the board of directors of the Utah corporation, held in Salt Lake City, state of Utah, on the fifteenth day of January, 1896, the following resolutions were adopted, to wit:

> “Resolved, that the vice president and secretary of this corporation be, and they are hereby, authorized, directed, and empowered, in the name of, and as the act and deed of, this corporation, to make, execute, sign, acknowledge, and deliver to the Burke Land and Livestock Company, a corporation, under the laws of the state of Illinois, a good and sufficient deed of conveyance, conveying to said corporation all the right, title, claim, and interest, both in law and in equity, of the corporation of, in, and to, all of those several and sundry tracts of land now owned, held, enjoyed, and possessed by this corporation, situated in the state of Idaho, together with all improvements thereon, water rights incident thereto, and all privileges of every name or nature appurtenant or belonging to said lands; said conveyance being subject, however, to that certain mortgage, bearing date March 21, 1895, and duly recorded in the recorder’s office of Bingham county records, in the said state of Idaho, in book H’ of mortgages, page 493, executed by the Burke Land and Cattle Company, as mortgagor, in *52favor of Wells, Fargo & Co., as mortgagee thereunder, and being for the sum of $75,000, as evidenced by the note set forth fully in said mortgage, and payable on September 1, 1896, with interest at the rate of eight per cent per annum from date, payable quarterly, and bearing even date with said mortgage; and further subject to the possession of said lands now held by the said Wells, Fargo & Co., as additional security for the said promissory note, and the payment thereof, heretofore in this resolution mentioned. And further resolved, that the vice-president and secretary of this corporation be, and they are hereby, authorized, directed, and empowered, in the name of, and as the act and deed of, this corporation, to make, execute, transfer, sign, seal, and deliver, a good and sufficient bill of sale to the Burke Land and Livestock Company, a corporation organized and doing business under the laws of the state of Illinois, conveying and assuring to said last-named company all of the personal property, consisting of horses, cattle, harness, farming wagons, and all other personal. property, tools, implements, etc., now used at, or possessed by, this corporation on its ranch lands in the counties of Bingham and Logan, in the state of Idaho. Said bill of sale and transfer to be subject, however, to a certain chattel mortgage bearing date as of the 31st of March, 1895, and duly filed or recorded in the recorder’s office of the county records of Bingham and Logan counties, state of Idaho, and being for the sum of $75,000, as more fully set forth in said mortgage, and further subject to the possession of said personal property now held by the said Wells, Fargo & Co. as security for the said indebtedness of $75,000. Adjourned. (Signed) “J. E. DOOLY,

> “Vice-President.

> “HARRY T. DUKE,

> “Secretary.”

The negotiations which terminated in the purchase of all of the property of the Utah corporation by the Illinois corporation were conducted by said Frank W. Burke as agent for the Illinois corporation, and John E. Dooly, as vice-*53president of tbe Utah, corporation and as managing agent of Wells, Fargo *& Co.*

The trial court found, by its sixth finding of fact, that the Illinois corporation agreed to and with the Utah corporation and Wells, Fargo *& Co.*that it (the Illinois corporation) would pay, as the purchase price of said property, the amount of the three items referred to in the record as the “Overdraft Account,” amounting, on the fifteenth day of January, 1896, to $35,214.22, the note indebtedness of William Burke, amounting to $26,788.55, and the Buford-Croker judgment, amounting to $12,045.91. Said sixth finding is as follows: “That upon said fifteenth day of January, 1896, the plaintiff, by and through its said agent, was, by the officers and representatives of Wells, Fargo *&*Co., which company at said time had possession of and controlled all the stock of the Burke Land and Cattle Company, and who, through its officers, was in control of the business and affairs of the Burke Land and Cattle Company, advised that it (Wells, Fargo *&*Co.) would consent and agree to the sale of the property of said Burke Land and Cattle Company to the plaintiff only upon the assumption and payment by plaintiff of certain claims, which were then and there stated to said plaintiff, to wit: Money loaned and advanced to said cattle company by Wells, Fargo & Co. under and pursuant to said mortgages, and secured thereby, called the 'overdraft account/ amounting upon said date to the sum of $35,214.22. A note indebtedness due from Wm. Burke to Wells, Fargo *&*Co., amounting on said date to $26,788.55, which was one of the items of indebtedness secured by the pledge to said Wells, Fargo *& Co.*by William Burke of nine hundred and ninety-six shares of the capital stock of the Burke Land and Cattle Company. Also what was called the Buford-Croker judgment against William Burke and others, amounting on said date to $12,045.91, also secured by said pledge of stock. That thereupon, before said sales and transfers were made or agreed upon, and as a part of the negotiation and transaction of sale and transfer, and in consideration thereof, the plaintiff acknowledged and agreed to and with the defendants, Burke Land and *54Cattle Company and Wells, Fargo & Co., that it (the plaintiff) would pay said items, and each of them, as the purchase price of said property.” In the eleventh finding of fact the court finds, among other things, as follows: “And by the agreement of January 15, 1896, there was to be paid Wells, Fargo & Co., by the Burke Land and Livestock Company, the sum of $45,024, no part of which has been paid, which comprises, with interest, the two items referred to in the testimony as the personal indebtedness of William Burke and the Buford-Croker judgment, which said items the plaintiff did, on the fifteenth day of January, 1896, in consideration of the transfer and sale, acknowledge and agree to pay, and which was a part of the consideration for said sale and transfer, and was a part of the purchase price of said property; both of said items, and the whole thereof, having been secured by a pledge of said nine hundred and ninety-six shares of stock in the Burke Land and Cattle Company by William Burke, from whom said indebtedness was due to Wells, Fargo & Co., to whom said indebtedness was due.” The purchase price of said property was thus found to have been made up of said three items.

The deed executed by the Utah corporation, on January 15, 1896, conveying to the Illinois corporation the real estate of the former corporation, contains, among others, the following clause, to wit: “It is expressly understood and agreed that this conveyance is made and accepted subject to the payment and discharge by the said party of the second part of that certain mortgage made and executed by said party of the first part in favor of Wells, Fargo & Co., and bearing date March 21, 1895, and now duly recorded in the recorder’s office of Bingham county, state of Idaho, in book TF of mortgages, at page 439, made to secure a certain promissory note in said mortgage described for the sum of seventy-five thousand ($75,000.00) dollars.” And the bill of sale made on the last-mentioned date by the Utah corporation, conveying to the Illinois corporation the identical personal property described in the chattel mortgage heretofore referred to, contains the following clause, to wit: “It is distinctly understood and agreed, by and between the parties hereto, that the above sale is made subject and sub*55ordinate to that certain chattel mortgage made and entered into on the twenty-first day of March, 1895, by and between the Burke Land and Cattle Company, a corporation, mortgagor, •and Wells, Fargo & Co., a corporation doing a banking business in the city of Salt Lake and territory of Utah, mortgagee, which said chattel mortgage is filed for record in the county records of said Bingham and Logan counties, state of Idaho.” Said deed and bill of sale were executed in pursuance of the contract entered into on January 15, 1896, and referred to in the sixth finding of fact above quoted, which finding sets forth the consideration for the execution of said deed and bill of sale, by which the legal title to the property therein described was transferred and conveyed to the Illinois corporation.

This action arose out of that transaction. The respondent and appellant corporations rely upon that contract as the basis of this action and defense, and that transaction is the subject of this suit. The plaintiffs' complaint is based upon that contract. The defendant’s answer and cross-complaint of the defendant Wells, Fargo & Co. are also based upon that transaction. The plaintiff corporation in its complaint alleges performance on its behalf, and also tenders performance, and makes the mortgagee and vendor parties defendant, and it alleges its right under said contract to the immediate possession of all of said property after the fifteenth day of January, 1896. The defendants denied said allegations, and defendant Wells, Fargo & Co., by cross-complaint, demanded a foreclosure of said mortgages, and for such relief as might be equitable. Counsel for respondents contend that all of the relief consistent with the ease made by the complaint, and embraced within the issues, was the usual decree of foreclosure and sale for the amount due upon the notes and mortgages, and counsel fees, with the usual direction for judgment for the deficiency, if appellant was personally liable for the deficiency. We are unable to agree with counsel in that contention.

The court below found upon all of the material issues made by the pleadings, and the pleadings are comprehensive enough to authorize findings of fact and a judgment settling the rights of the parties in and to the subject matter of the action. This *56court held in *Stevens v. Association,*5 Idaho, 741, 51 Pac. 779, that “sections 4183-4185 of the Revised Statutes, inclusive, are intended to prevent a multiplicity of suits, and to settle all controversies and causes of action between the parties which arise out of, or are connected with, the transaction upon which plaintiff’s action is founded.” This action is based on the transaction of January 15, 1896, and the pleadings are sufficiently comprehensive to authorize a judgment settling the controversy over that transaction between the parties.

Section 4353 of the Revised Statutes, is as follows: “The relief granted to the plaintiff, if there be no answer, cannot exceed that which he shall have demanded in his complaint; but in any other case, the court may grant him any relief consistent with the case made by the complaint and embraced within the issue.” Under the provisions of that section, when an answer is filed, as was done in the case at bar, the court may grant any relief consistent with the case made by the complaint, and embraced within the issues made, whether such relief be prayed for or not. *(Jaeckel v.*Pease, 6 Idaho, 137, 53 Pac. 399; *Johnson v.*Polhemus, 99 Cal. 240, 33 Pac. 908.) The law of civil procedure in this state prohibits the splitting up of causes of action and a multiplicity of suits. A court of equity, having obtained jurisdiction of a cause for any purpose, may retain it for all purposes, and proceed to a determination of all of the matters in issue. (Jones on Equity Jurisprudence, secs. 181, 242.) The plain intention of our law is that, when the-parties are once in court, all conflicting claims shall be settled between them arising out of the subject matter involved in the issues.

The main contention arises over whether the entire purchase-price of said property was secured by said mortgages. Counsel for respondent contend that only that part of the purchase-price referred to as the “Overdraft Account” is secured by said mortgages, while counsel for appellants contend that the entire purchase price is secured thereby. Counsel for respondent, in support of their contention, cite the clauses in said deed and bill of sale above quoted, and contend that the language there used was only for the purpose of description or identifi*57cation of the mortgages, and not to fix the exact amount due thereon; while counsel for appellants contend that, as the consideration for said sale and transfer, the Illinois corporation agreed to pay the amount of said overdraft account, the amount of the Buford-Croker judgment, and the amount of the individual indebtedness to Wells, Fargo & Co., and also agreed that said mortgages should stand as security for the payment of. said items, amounting, at the date of the sale, to $74,048.68. Counsel for respondent, in support of its contentions, have filed a very voluminous brief, in which are cited many authorities upon the point that the words used in said deed and bill of sale are only for the purpose of description and identification and for no other purpose. We cannot agree with counsel in that contention. If there were room for doubt as to the meaning of said clause (which we think there is not), it would then be our duty to look to the circumstances which surrounded the parties at the time of entering into the contract, and would read and construe the language of said clauses in the light of those circumstances. *(Nash v. Towne, 5*Wall. 689, 18 L. ed. 527; *Canal Co. v. Hill,*15 Wall. 94, 21 L. ed., 64; *Merriam v. United States,*107 U. S. 437, 2 Sup. Ct. Rep. 536, 27 L. ed. 530; *Thompson v. McKay,*41 Cal. 221.) In *Saunders v. Clark,*29 Cal. 299, it is held that, where any doubt exists as to the true meaning of a written contract, the condition and motives of the contracting parties, as shown by its recitals or by outside evidence, must be looked into to ascertain what is the real intention of the parties, which, when ascertained, must prevail over the literal sense. And in *Walsh v. Hill,*38 Cal. 481, the rule is laid down that, in construing a Avritten instrument, the only rule of much value is to place ourselves as nearly as possible in the places which were occupied by the parties at the time the instrument was executed, and then, taking the contract by its four corners, read it. Applying the rule set forth in those cases to the interpretation of said clauses, and'there is no doubt as to their true meaning.

At the time said deed and bill of sale were executed, Wells, Fargo & Co. were complete masters of the situation. They owned all of the capital stock of the Utah corporation, had *58actual possession of all its property of every description and kind, and controlled its board of directors. At the date of the contract, that property had cost Wells, Fargo & Co. $74,048.68, at which date the court found that said property was worth $100,000. Wells, Fargo *&*Co. were willing that William Burke should have whatever remained of said property after it had been paid said sum, with interest. The Illinois corporation was organized by William Burke, his sons and relatives, for the purpose of saving something out of said property. And the Illinois corporation, through its agent, negotiated with Wells, Fargo & Co., and, if you please, the Utah (dummy) corporation, for the purchase of said property. And in those negotiations *John*E. Dooly, general agent for Wells, Fargo & Co. and vice-president of the Utah corporation, offered to take the sum cf $74,048.68 for said property, and that offer was accepted by the Illinois corporation through its duly airthorized agent, Frank W. Burke. Before that contract was executed, Wells, Fargo & Co. had abundant and ample security or property out of which to make said $74,048.68. Under those circumstances, it would be most unreasonable to construe said clauses in accordance with the contention of counsel for respondent. No sane man, placed as Wells, Fargo *&*Co. were in said transaction, would have released the larger part of his security, and transferred said property, as it is contended they did by the sale of January 15, 1896, thus losing the greater part of their security. It clearly appears, when read in the light of the facts and circumstances of this case, that said clauses were not intended to release any security or weaken the position or security of Wells, Fargo & Co. in its relation to said property. Said clauses must not be given a construction entirely different from the clear intention of the parties. The intention was that the entire purchase price of said property should be secured by said mortgages, and the Illinois corporation is estopped from disputing their validity in that regard.

Counsel contend that, if it was agreed that said mortgages should stand as security for the payment of said purchase price, such agreement, being oral, would not extend said mortgages so as to include the items referred to as the individual in*59debtedness of William Burke and the Bnford-Croker judgment. In support of this contention, section 3351 of the Bevised Statutes, is cited, which is as follows: “A mortgage can be created, renewed or extended only by writing, executed with the formalities required in the case of a grant or conveyance of real property.” Counsel in their brief cite many cases, and quote extensively from them in support of this contention. That section of our Bevised Statutes was enacted to prevent fraud, and not for the purpose of enabling one to procure the property of another through fraud. Its provisions are not applicable to this ease. The Illinois corporation is not mortgagor or mortgagee. It is a stranger to said mortgages, and, as it agreed that they should stand and remain as security for the payment of the purchase price of said property, it is estopped from denying that they are security therefor, and at the same time claiming the property under the contract. It will not be permitted to repudiate its agreement in regard to the mortgages, and enforce the remaining part of said contract.

It has been suggested that there was nothing due on the overdraft account, as it is shown that it was fully paid, or, at least, nothing due thereunder, in October, 1895, and for that reason said mortgages died, and were dead at the date of said sale; and, as they were dead, they could not be extended to secure the purchase price. If this contention should prevail, the Illinois corporation would be entitled to the ownership and possession of over $100,000 worth of property, without paying one cent of the purchase price or giving any security therefor.

We do not think that the minds of the contracting parties met on a proposition of that kind, and, if they did not, no such contract was made. The Illinois corporation will not be permitted to obtain possession of said property, and evade the payment therefor, on the technical ground that its oral agreement "to the effect that said mortgages should stand as security for the payment of the purchase price was without any binding force whatever. The respondent has sought equity, it must do equity. It seeks to compel the appellants to keep their contract of sale, but desires to evade a very material provision of said contract stipulated to be performed by it. That it will not be permitted to do.

*60It is suggested that the "Utah corporation could not execute a mortgage upon its property to secure the individual indebtedness of William Burke, or that it was not competent for it, on the fifteenth day of January, 1896, to deal with and treat said mortgages as security for the individual indebtedness of William ^ Burke. Neither the Utah corporation, the stockholders, nor any creditor, except, perhaps, one whose rights can be amply protected, are here complaining of that transaction, and, under the facts of this case, the Illinois corporation cannot successfully interpose any objection for them. If the Utah corporation assumed to pay the private indebtedness of William Burke, a stockholder or creditor might, under some circumstances, complain, but a stranger will not be permitted to do so. In this class of eases, the decisions turn largely on the question of who is complaining. (Cook on Stock and Stockholders, 3d ed., sec. 681.) In one sense, the Utah corporation was what is termed a “dummy” corporation. It was organized by William Burke. All of its capital stock, except four shares, was issued to him. He transferred, without consideration, all of his property to said corporation, and to hold, under those facts, that said Utah corporation could not assume the private indebtedness of said Burke, would be to hold that a debtor could thus put his assets beyond the reach of his creditors by organizing a “dummy” corporation, have its capital stock all issued to himself, convey his property to it without consideration, and presto! his assets are beyond the reach of his creditors.

Many authorities have been cited, and much law quoted, by counsel for respondent in their brief, upon corporation law, the powers and limitations of the president, boards of directors, and stockholders, and the inviolability of fiduciary relations, and upon the general rules and ethics that control in the conduct of corporation business; but those have no application to the proposition whether the Illinois corporation shall comply with its contract of purchase, and pay the purchase price it agreed to pay, before it shall have the possession and control of the property involved in this action. If, as is suggested, Frank W. Burke, under the authority of the Illinois corporation, had no power to make the contract that he did make for *61the purchase of said property, that corporation might repudiate his act in that regard; but it cannot adopt part and repudiate part, without the consent of the Utah corporation, which corporation was owned and controlled by Wells, Fargo & Co. on the date when said contract of sale was made.

The action of the court in allowing fifty dollars per month to Mr. Taylor, as salary as manager of the business of the Utah corporation, is assigned as error. The court found that he managed said business in a fairly skillful and economical manner. The record shows that Mr. Taylor took possession of said property on May 15, 1895, and continued there until June 30, 1897, when a receiver was appointed; that his duties consisted in looking after the business generally, paying the hired men, buying and selling stock, and during said time he paid out over $100,000, and received and deposited in bank about $150,-000; that the ranches consisted of five thousand two hundred acres of patented land, about four-fifths of which was hay land; that when he first took possession he counted nearly five thousand head of cattle. Mr. Dooly testified that William Burke fixed Taylor’s salary first at $200 per month, and that at the end of three months he (Dooly) objected, and it was reduced, by consent of Burke, Taylor, and Dooly, to $150 per month, and that it was continued at that sum until the receiver was appointed. Mr. Burke denies a part of the above testimony. But we think, under all of the facts as shown by the evidence, the amount of property and transactions involved, the court erred in not fixing said salary at $150 per month.

We think, under the facts of this case, the Illinois corporation cannot complain because the Utah corporation agreed to pay the private debts of its creator and owner, who, without consideration, gave it property the value of which greatly exceeded the amount of said debts, and out of which the private creditors of Burke might have made their claims. It is suggested that the doctrine of *ultra vires*applies to the assumption of said private indebtedness by the Utah corporation, but the rule is that that doctrine should not be applied when it would defeat the ends of justice or work a legal wrong. *(Orchard Co. v.*Hanley, 15 Utah, 506, 50 Pac. 611; *Railway**62*Co. v. McCarthy.*96 U. S. 258, 24 L. ed. 693.) It appears that the Utah corporation was organized for the sole purpose-of enabling William Burke to do business in the name of a. corporation. It was simply William Burke doing business in. the name, of the Utah corporation. It was organized by him.. Its entire capital stock was issued to him, except four shares,, which were issued to persons to qualify them as directors. From Burke it got all of its property without any consideration. He managed its affairs. It assumed to pay the indebtedness of Burke, which it had a right to do as against any objection here raised by the Illinois corporation, who is endeavoring to get possession of said property without paying what it. agreed to pay for it.

The trial court found, by its sixth finding of fact, that on the fifteenth day of January, 1896, there was due Wells, Fargo & Co., on the overdraft account, $35,244.22; on note indebtedness from William Burke, $26,788.55; on Buford-Croker judgment, $12,045.91; and, if nothing has been paid on the last, two items, interest at the stipulated rate must be computed on said items from that date up to the time when said items are paid or judgment entered. In other words, whatever was due-on said items on January 15, 1896, bears interest at the stipulated rate up to the time of payment or judgment entered.

The court erred in disallowing the appellants their costs. This action was brought by respondent without cause or justification, and all the costs of this suit were occasioned by its-effort to get possession of said property without paying the price it had agreed to pay therefor, and, under those circumstances, it would be most unjust and inequitable to make the appellants pay costs that were made by reason of this premature action brought by respondent. The judgment of the court below must be reversed, and the cause remanded, with instructions to make findings of fact and conclusions of law, and enter judgment and decree, in conformity with the views expressed in this opinion. Costs of this appeal are awarded to appellants.

Huston, C. J., and Quarles, J., concur.