ON REHEARING.
QUARLES, J.— The opinion delivered in this case on the former hearing was set aside on petition for rehearing filed by the respondent, in which petition it was urged that the statement of facts prepared by Mr. Chief Justice Morgan on the former hearing, is incorrect, and not sustained, in some particulars, by the evidence in the record. (See former opinion, 5 Idaho, 145, 51 Pac. 996.) The question whether a trust deed given as security for a debt can be foreclosed by notice and sale, without an action of foreclosure, commenced and prosecuted in the proper court, was not argued by the appellant, and Only briefly by the respondents, on the former hearing. But since granting the rehearing both parties have filed additional briefs, in which this question, which we think is the controlling one in this ease, is fully discussed; and on the present hearing this question has been very ably and elaborately discussed. We now proceed to the consideration of this question, which must be determined by the statutes of our state. The foreclosure of a trust deed by notice and sale, under power given in the deed, is, in the absence of statutory provision forbidding it, unquestioned.
We quote the following sections of the Bevised Statutes of Idaho:
“Sec. 3325. A lien is a charge imposed in some mode other than by a transfer in trust upon specific property by which it is made security for the performance of an act.”
“See. 3327. A general lien is one which the holder thereof is entitled to enforce as a security for the performance of all the *10obligations, ox all of the particular class of obligations, which exist in his favor against the owner of the property.
“Sec. 3338. A special lien is one which the holder thereof can enforce only as security for the performance of a particular act or obligation, and of such obligations as may be incidental thereto.”
“See. 3333. Notwithstanding an agreement to the contrary, a lien, or a contract fox.a lien, transfers no title to the property subject to the lien.
“Sec. 3334. All contracts for the forfeiture of property subject to lien, in satisfaction of the obligation secured thereby, and all contracts in restraint of the right of redemption from a lien, are void.”
“Sec. 3350. Mortgage is a contract by which specific property is hypothecated for the performance of an act without the necessity of a change of possession.”
“Sec. 3353. Every transfer of an interest in property other than in trust, made only as a security for the performance of another act, is to be deemed a mortgage, except when in the ease of personal property it is accompanied by an actual change of possession, in which ease it is to be deemed a pledge. ■
“Sec. 3354. The fact that a transfer was made subject to de-feasance on a condition, may, for the purpose of showing such transfer to be a mortgage, be proved (except as against a subsequent purchaser or encumbrancer for value and without notice), though the fact does not appear by the terms of the instrument.”
The foregoing sections are parts of title 13 of the Civil Code, under the general subject of “Liens.”
Section 4530 of the Revised Statutes, which is a part of the Code of Civil Procedure, is as follows: “There can be but one action for the recovery of any debt, or the enforcement of any right secured by mortgage upon real estate or personal property, which action must be in accordance with the provisions of this chapter. In such action the court may, by its judgment, direct' a sale of the encumbered property (or so much thereof as may be necessary) and the application of the proceeds of sale to the payment of the cost of the court and the expenses of the sale, *11and the amount due to the plaintiff; and sales of real estate under judgments of foreclosure of mortgages and liens are subject to redemption as in the case of sales under execution; and if it appear from the sheriff’s return that the proceeds are insufficient, and a balance still remains due, judgment can then be docketed for such balance against the defendant or defendants personally liable for the debt, and it becomes a lien on the real estate of such judgment debtor, as in other cases on which execution may be issued.”
Section 4523 of the Bevised Statutes, is as follows: "A mortgage of real property shall not be deemed a conveyance, whatever its terms, so as to enable the owner of the mortgage to recover possession of the real property without a foreclosure and sale.”
The foregoing sections of our statute must be considered and construed together in determining the question before us, which is one of remedy. In construing these statutes, it is the duty of the court to give effect to all of them, and to carry out the general policy and evident intent of all of said statutes, when considered together. We must so construe them, if possible, that effect will be given to each one, and to every part of each one, without nullifying a single provision in either one of them. Mr. Sutherland,in his work on Statutory Construction,at section 288, gives the proper rule, in the following language: “Where enactments separately made are read in pari materia, they are treated as having formed in the minds of the enacting body parts of a connected whole, though considered by such body at different dates, and under distinct and varied aspect of the common subject. Such a principle is in harmony with the actual practice of legislative bodies, and is essential to give unity to the laws, and connect them in a symmetrical system. Such statutes are taken together and construed as one system, and the object is to carry into effect the intention. It is to be inferred that a code of statutes relating to one subject was governed by one spirit and policy, and was intended to be consistent and harmonious in its several parts and provisions. For the purpose of learning the intention, all statutes relating to the same subject are to be compared, and, so far as still in force, *12brought into harmony, if possible, by interpretation, though they may not refer to each other, even after some of them have expired or been repealed. An amendatory act and the act amended are to be construed as one statute, and no portion of either is to be held inoperative, if it can be sustained without wresting words from their appropriate meaning. Where a statute is made in addition to another statute on the same subject, without repealing any part of it, the provisions of both must be construed together.” In construing our statutes, supra, it is manifest to us that, in enacting said statutes, it was clearly the intention of the legislature to declare — first, that a contract “by which specific property is hypothecated for the performance of an act,” especially the payment of a. debt, shall be regarded and treated as a mortgage; and, second, that a lien given under such contract should be enforced or foreclosed in one manner only, to wit, by an action brought in a proper court, under the provisions of section 4520, supra.
But it is contended by the respondent that the trust deed in question, executed by George H. Roberts as party of the first part, to Frank H. Taylor, trustee (or, in event of his death or removal from Idaho, the acting sheriff of Alturas county to become such trustee), party of the second part, securing a debt of $1,500 from said grantor, Roberts, to the First National Bank of Hailey, the party of the third part, is not subject to the operation of the statutes quoted supra, and that same is exempted from the operation of said statutes by reason of the peculiar wording or phraseology of sections 3325 and 3353, supra. This contention we do regard as correct. In enacting each and all of said statutes, the legislature was prescribing rules to govern all liens created by contract between creditors on the one side and debtors on the other, by which property is set apart as security for the payment of debt, or hypothecated for the performance of an act, and providing the remedy for the enforcement of the right, or lien of the one party as against the other. The trust deed in question here hypothecated the real estate in controversy, as security for the payment to the bank of the debt therein named. It expressly provides: “These trusts shall be and continue as security to the party of the third part; and *13its assigns, for the repayment, in gold coin of the United States, of the moneys so borrowed by the said party of the first part, and the interest thereon.'’'’ It then provides that, in ease default is made in the payment of the sum so borrowed by the grantor, the trustee therein named might advertise the property so hypothecated for sale, at least once a week for three weeks, in some newspaper published in the county where said property is situated, and sell same at public auction for cash, to the highest bidder therefor, applying so much of the proceeds as necessary to the payment of said debt, interest, and costs of sale. This deed is, in effect, a mortgage. It is in the nature of a mortgage. Under the definition of “mortgage” given in section 3350, supra, it is a mortgage, and must be so regarded. It is not such a transfer (in trust) as is contemplated by the legislature in sections 3325 and 3353. The instruments which the legislature evidently had in contemplation, and intended to exempt from the operation of the statutes cited supra, were such as create trust, but at the same time absolutely convey the title from the grantor, thus doing something more than the mere hypothecation of property for the payment of debt. A deed of trust, conveying absolutely and irrevocably the title of the grantor, is exempted from the operation of said statutes. For instance, A conveys certain real estate to B, to be held in trust by B for C (a minor), the rents and profits from which are to be applied by B, the trustee, to the support, maintenance, and education of C until he shall arrive at majority, with the further provision that B shall convey such real estate absolutely to C when the latter becomes twenty-one years old. This deed would create a trust, would be a “transfer in trust,” and could not be construed or regarded as merely creating a lien or hypothecating property for the performance of an act, and would create no lien which could be foreclosed, either with or without an action commenced for that purpose. Again, if A files his petition in insolvency under the provisions of our code, is adjudged an insolvent, and his creditors select an assignee by the proper proceeding, whereupon the clerk of the court in which the action is pending makes a deed conveying the property of the insolvent to such assignee (as the law makes it his duty to do), this deed *14is a transfer in trust for the benefit of the creditors of the insolvent, but it is not a mortgage, subject to the operation of the statutes cited sufra. Any hypothecation of property made by the debtor by his own voluntary act, as security for the payment of a debt which he owes to his creditor, whether made with or without the intervention of a third party as trustee, is, under the statutes above quoted, a mortgage, and to be so regarded and treated, whether the instrument by which such property is hypothecated is called a mortgage, deed, or trust deed, irrespective of its form or provisions. The legislature, following the trend of modern legislation in enactingthe statutes quoted supra,intended to protect the debtor from burdensome liabilities by providing for contracts under which the creditor may be secured, yet protecting the debtor from oppression, and giving him, in case of default prior to enforcement of security given in the nature of a mortgage for the payment of a debt which he owes his creditor, the right to meet his creditor, in an action in a competent court, where he may present any defense which he may have against his creditor, insuring to the debtor a judicial sale of the property hypothecated, and securing to the debtor the right to redeem from such sale within a given time after it is made. The legislature has provided that all contracts in restraint of the equity of redemption are void, that the hypothecation of property for the payment of a debt is a mortgage, and that a mortgage can be enforced only by an action of foreclosure, brought, in a competent court, yet it is contended that the trust deed in question, executed merely for the purpose of securing the payment of a given debt at a specified time, was' properly foreclosed by notice and sale, without an action commenced in the-proper court, and that by such sale the absolute title of the-grantor passed to the purchaser, and, further, that such sale-deprived the grantor of all right of redemption from such sale. This contention is contrary to the letter, and repugnant to the spirit, of our statutes, and is in direct contravention to the general policy and evident intent of the statutory law of this state. We feel compelled to hold that the instrument in question must be treated and regarded as a mortgage. Mr. Jones in his work on Mortgages, at section 1769, says: “Deeds of trust, *15as has already been noticed, are, in legal effect, mortgages. Where a mortgage is regarded, in accordance with the common-law doctrine, as a conveyance of the legal estate, a deed of trust is, of course, none the less a conveyance of the legal estate. The only difference of opinion on this point is whether, in those states in which a mortgage is regarded as a mere lien, and not a conveyance of the legal estate, a deed of trust shall be held to vest the legal estate in the trustees. Generally, a deed of trust is in this respect held to have only the same effect as a mortgage; such being the decision in Iowa, Nebraska, and Kansas. But, on the other hand, in Florida, and perhaps in other states, it is held that, although a mortgage does not vest the legal estate in the mortgagee, a deed of trust is a conveyance which does vest the legal title in the trustee.”
Under the statutes cited supra, no contract creating a lien upon specific property for the payment of a debt can convey the legal title. A mortgage, or any contract in the nature of a mortgage, merely creates a lien, and leaves the legal title in the mortgagor or grantor, which'can only be passed out of him by judicial sale, in a proper action under the statute, after which such grantor or debtor may redeem within the time provided by law for redemption of property from execution sale. It may or may not be wise to prescribe by legislation rules for the protection of the debtor. With that question we have nothing to do. The legislature have the right to prescribe rules protecting the weak and impecunious from oppressive contracts, under which usury may be extorted, or valuable property forfeited for a nominal sum. It is the duty of the court to expound and apply the law as it is found. It is also the duty of the court to give to the statutes in question a liberal construction, to the end that the policy and intent of such statutes, taking them as a whole, with relation to the subject regulated, may be carried out and enforced. The legislature having defined so clearly and forcibly the characteristics of a mortgage, and provided for the enforcement of mortgages by judicial action only, we could not hold that an instrument in the nature of a mortgage, given for the same purpose that mortgages are given, and which is, by the positive terms of our statutes, to be regarded and treated as *16a mortgage, can be enforced or foreclosed, in any manner other than that prescribed for the enforcement or foreclosure of mortgages, without giving to the statutes under consideration a strained, technical, and unreasonable construction, which would defeat, in part at least, some of the manifest objects of the statutes under consideration.
But it is argued with much force by the respondents that the statutes under consideration were borrowed from our sister state, California; that said statutes have been given a different construction by the courts of California; and that the construction so given by the California courts is binding upon this court, the statutes having been adopted with reference to the construction placed on them, prior to their adoption here, by the state from which we borrowed them. To show the different construction of the statutes under consideration from that here given, we are cited to the cases of Koch v. Briggs, 14 Cal. 256, 73 Am. Dec. 651; Bateman v. Burr, 57 Cal. 483; Fogarty v. Sawyer, 17 Cal. 589; Grant v. Burr, 54 Cal. 298; Durkin v. Burr, 60 Cal. 360; More v. Calkins, 95 Cal. 437, 29 Am. St. Rep. 128, 30 Pac. 583; Barr v. Shroeder, 32 Cal. 614; Thompson v. McKay, 41 Cal. 221; Fuquay v. Stickney, 41 Cal. 583; Savings etc. Soc. v. Deering, 66 Cal. 286, 5 Pac. 353; Partridge v. Shepard, 71 Cal. 477, 12 Pac. 480. We have carefully examined all of the California eases cited, and it does not appear, from any of the cases, that the statutes which we have borrowed from California, relating to the subject under consideration, quoted supra, have been considered and construed by the supreme court of California in pari materia, or that said statutes had been construed and considered as one system, in conformity to the rule laid down by Mr. Sutherland in his work on Statutory Construction, hereinbefore quoted.
Owing to the fact that our codes which we adopted in 1887 were, to a great extent, copied from the California codes adopted in 1872, the courts in this jurisdiction take notice of the California code for the purpose of comparing the provisions of our codes with those of the California codes, thus enabling our courts to ascertain the construction placed upon those statutory provisions which we have borrowed from the California code *17by the supreme court of California. Sections 3325, 3327, 3328, 3333, 3334, 3350, 3353, and 3354 of our Beyised Statutes, quoted swpra., are identical with sections 2872, 2874, 2875, 2888, 2889, 2920, 2924, and 2925 of the Civil Code of California; and sections 4520 and 4523 of our Revised Statutes are the same as sections 726 and 744 of the Code of Civil Procedure of California. The California Civil Code of 1872 contains the two following sections, which were never adopted by the legislature of Idaho, to wit: •
“Sec. 2931. A mortgagee may foreclose the right of redemption of the mortgagor in the manner prescribed by the Code of Civil Procedure.
“Sec. 2932. A power of sale may be conferred by a mortgage upon the mortgagee or any other person, to be exercised after a breach of the obligation for which the mortgage is a security.”
It will thus be seen that our legislature have adopted only a portion of the system relating to the subject under consideration which the legislature of California had adopted fifteen years prior to the enactment of our statutes in question here. Our legislature having adopted only a part of that system, refusing to adopt sections 2931 and 2932 of the Civil Code of Calif ornia, and which authorize the execution, by the mortgagee, or trustee in a trust deed, of a power of sale given in such mortgage or trust deed, we think the conclusion irresistible that our legislature intended that a power of sale should not be given, or, if given, should not be exercised by a mortgagee, or by a trustee in an instrument termed a trust deed, but winch is, in contemplation of law, merely a mortgage. Section 744 of the Code of Civil Procedure of California, cited supra, was construed by the supreme court of California in Koch v. Briggs, supra, without reference to any other statute, apparently, the said section being section 260 of the original Practice Act referred to in that decision. Whether sections 2931 and 2932 of the California Civil Code, cited supra, or similar statutes, were in force in California at the time the ease of Koch v. Briggs was decided, we are not advised. But, if the said two last-named statutes were then in force in California, the supreme *18court of California must have taken them into consideration in construing section 260 of the California Practice Act, although said statutes were not mentioned in that decision.
To uphold the rule contended for by the respondents, by enforcing a power of sale contained in an instrument, whether termed a mortgage or trust deed, would violate one of the oldest maxims of law, by doing indirectly that which cannot be done directly, but which is prohibited by law. We are cited to the case of First Nat. Bank v. Bell Silver etc. Min. Co., 8 Mont. 32, 19 Pac. 403, decided by the supreme court of Montana in 1888, and the same case in 156 U. S. 474, 15 Sup. Ct. Rep. 440, as sustaining the position contended for by the respondents. In the decisions rendered in that case by the supreme court of the territory of Montana and by the supreme court of the United States it does not appear that Montana had adopted all of the statutes which we have quoted from our Eevised Statutes, nor does it appear in either of the decisions in that case that Montana did, like Idaho, adopt part, and refuse to adopt all, of the provisions of the California code relating to the subject under consideration; hence the decisions in the Montana case are not applicable. This is the first time that this question has been before this court, and, if we had adopted all of the provisions of the California code relating to the subject under consideration, or if our statute, section 4523, supra,, corresponding to section 260 of the original California Practice Act (now section 744 of the California Code of Civil Procedure), and corresponding to section 371 of the Compiled Laws of Montana (as cited in First Nat. Bank v. Bell Silver etc. Min. Co., 8 Mont. 32, 19 Pac. 403), we should feel constrained to follow the rule announced by the supreme court of California in Koch v. Briggs, supra, and since followed by that court, and by the supreme court of Montana. The rule that, by adopting a statute from a sister state the construction of the statute by the courts of the latter state is also adopted, is a general rule that is universally recognized. But this rule does not apply to a case where the statute borrowed has been so changed or modified by the state borrowing it as to materially change the policy of the statute thus borrowed, nor does the rule apply to a ease where one state adopts only a por*19tion of tbe statutes of another state upon a given subject, and the construction does not reasonably apply to the portion of the system so borrowed. In our view, if all of the statutes of California referred to herein were considered in pari materia, and so construed, they would justify and fully support the California rule; and while the California court has not, in construing section 744 of the California Code of Civil Procedure, in any of the cases to which our attention has been called, referred to the other statutes named, yet we feel convinced that that court, in construing said statute, had in mind the- other statutes relating to the same subject, and construed said statute with reference to the others relating to the subject under consideration.
Bespondents in their brief cite the following note to section 744 of the California Code of Civil Procedure, to wit: “Deeds of trust are to be distinguished from mortgages. This section has no application to them. (Bateman v. Burr, 57 Cal. 480; Grant v. Burr, 54 Cal. 294; Koch v. Briggs, 14 Cal. 256, 73 Am. Dec. 651.)” And, in support of the doctrine announced in said note by the compilers of .the California code, the respondents have cited us to the citations contained in an article written by Judge Dillon in 2 American Law Register, New Series, page 655. Those authorities hold that a deed of trust places the legal title in the trustee. That was the rule at common law, but does not apply here, for the reason that it is in direct contravention of the provisions of our statutes. Judge Dillon, in section 4 of said article (Id. 648), says: “Deeds of Trust and Mortgages, with Power of Sale, Substantially Identical. A mortgage with a power of sale, and a deed of trust where the power of sale is placed in a third person, are in substance the same. Some of the cases have denied inis. But those taking this view are numerous. Kent defines a ‘mortgage’ thus: ‘A mortgage is the conveyance of an estate by way of pledge for the security of debt, and to become void on payment of it. The legal ownership is vested in the creditor; but, in equity, the mortgagor remains the actual owner, until debarred by his own default or judicial decree.’ (4 Kent’s Commentaries, 136.) He refers to instruments with powers of sale as mortgages. (4 *20Kent’s Commentaries, 146.) No doctrine is more invincibly established than that every instrument intended to secure the payment of money or the performance of some collateral act is a mortgage. This is the test: ‘If a transaction resolve itself into a security, whatever may be its form, and whatever name the parties may choose to give to it, it is in equity a mortgage.’ ”
Our statutes are in harmony with the rule announced by Judge Dillon, but they overturn the doctrine announced by Kent, that the legal title passes to the mortgagee. The sale under the trust deed in this case was without authority of law, and did not pass the title from Boberts, the grantor of appellant, to the respondent, and the title to the property in question, i. e., the one-third in dispute, is in the appellant. It is alleged in the complaint, and admitted in the answer in this ease, that on the thirteenth day of February, 1890, the appellant tendered to the defendants, respondents here, the sum of $1,900 in payment of the debt, and interest thereon, mentioned in said trust deed, and in settlement of the costs of sale and attorney’s fees incurred m the sale under the trust deed in question. The appellant in his complaint alleged his readiness and willingness to pay the amount of said debt, interest, and cost to the defendants at any time that they would receive the same, and that he is ready and willing to produce into court the said money whenever the same shall be accepted by the defendants or ordered by the court. The defendant Venable, or the defendants, as the case may be, as owner of said trust deed, is entitled to receive from the appellant the amount of the debt mentioned in said trust deed, to wit, $1,500, with whatever interest was due thereon the thirteenth day of February, 1890, the time of the making of said tender by appellant, subject to offset by whatever amount may be found due to the plaintiff from the defendants on final accounting.
It appears from the record in this ease that the defendants have been working the mining property in question since the seventeenth day of August, 1889, and have extracted large quantities of valuable ore therefrom, and that the said defendants fail and refuse to account for the value of said ores, and fail and refuse to recognize the rights of the plaintiff therein. As *21owner of an undivided one-third interest in and to said mining property mentioned in the complaint in this action, appellant is entitled to one-third of the profits accruing from the working of said mine, and from the sale of ores extracted therefrom, by the defendants, and to this end an accounting must be had in the court below. The plaintiff is also, by virtue of the assignment from George H. Boberts to him, entitled to one-third of whatever sum may have been due to said George H. Boberts, at the date of said assignment, from the proceeds of said mining property, from the defendants, after the payment of all legitimate and proper expenses incurred by the defendants in working said mining property, up to the time of said assignment. Several questions have been raised in this ease which we have not passed upon, and which we deem it unnecessary to pass upon, for the reason that the conclusions reached, and the views herein expressed, sufficiently cover the case to enable the district court to settle the whole controversy between the parties in accordance with law and justice. The order denying the plaintiff a new trial is reversed, and the cause remanded to the district court, with instructions to vacate and set aside the judgment in favor of the defendants, and to grant the plaintiff a new trial, and for further proceedings consistent with the views herein expressed. Costs of this appeal awarded to the appellant.
Sullivan, C. J., and Huston, J., concur.