
    (August 3, 1922.)
    In the Matter of the Insolvency of the FIDELITY STATE BANK OF OROFINO. FIDELITY STATE BANK, Appellant, v. NORTH FORK HIGHWAY DISTRICT, Respondent.
    [209 Pac. 448.]
    .Highway Districts — Deposit op Funds — Statutory Provisions— Special or General Deposit — Contractual Relation — Trust Fund' — Daw Impairing Obligation op Contract — Constitutional Inhibitions.
    1. Prior to the enactment of chap. 42, Sess. Laws 1921, there was no lawful way for the funds of a highway district to reach the vaults of a hank under general deposit, and a treasurer of such district attempting to so deposit such funds and any bank undertaking to receive such funds otherwise than upon special deposit actccl in violation of the provisions of C. S., see. 8379.
    
      2. Prior to the enactment of chap. 42, Sess. Laws 1921,. the funds of a highway district illegally deposited in a bank upon general deposit remained the property of the district; the title thereto did not pass, to the bank, neither did the relationship of debtor and creditor arise between the bank and the district. In contemplation of law the bank received such funds impressed with a trust for the use of the true owner, and neither the illegal act of the treasurer of the district nor of the bank officials created any other relationship than that of bailor and bailee.
    3. In the instant ease when the funds of the highway district were deposited by its treasurer in the bank the law created a contract of special deposit, and the highway district being a municipal corporation was legally empowered to make this contract of special deposit and none other. The highway district acquired a vested right in this contract of special deposit made in its behalf by its treasurer.
    4. It is not within the constitutional power of the legislature to enact a valid statute abrogating a contract of special deposit between a highway district and a bank, making in lieu thereof a contract of general deposit whereby the title to the highway district’s money is passed to the bank and such money becomes a part of its general assets, subject to distribution among its depositors and creditors in case of insolvency, imposing upon the highway district the status of a creditor entitled to receive only its pro rata share of the assets of the bank upon liquidation.
    5. The remedy to enforce a contract is a part of the contract, and any subsequent law of the state which so affects that remedy as to substantially impair and lessen the value of the contract is such an impairment of the obligation of a' contract as to bring it within the inhibition of sec. 10, art. 1 of the federal constitution, and of see. 16, art. 1 of the constitution of this state.
    6. The obligation of a contract is impaired by a statute which alters its terms, by imposing new conditions or dispensing with existing conditions, or which adds new duties or releases or lessens any part of the contractual obligation or substantially defeats its ends.
    7. The inhibitions of the state and federal constitutions with regard to impairing the obligations of contracts extend to contracts made by a state or municipal corporation.
    8. Seld, that chap. 42, Sess. Laws of 1921, is unconstitutional and void in so far as it purports to affect or is sought to be applied to contracts of deposit of funds of municipal corporations made before its enactment, so as to impair the obligation of such contracts.
    
      APPEAL from the District Court of the Second Judicial District, for Clearwater County. Hon. Edgar C. Steele, Judge.
    Action to recover public moneys deposited with appellant bank. Judgment for plaintiff.
    
      Affirmed.
    
    F. S. Randall, for Appellant.
    The police power has been expressly reserved in the Idaho constitution. (Art. 11, sec. 8; Sandpoint Water etc. Go. v. City of Sandpoint, 31 Ida. 498, 173 Pac. 972.)
    Under the police power the legislature was authorized to pass the statute complained of and held unconstitutional. (Ndble State Bank v. Haskell, 219 U. S. 104, Ann. Cas. 1912A, 487, 31 Sup. Ct. 186, 55 L. ed. 112, 32 L. R. A., N. S., 1062; Assaria Stdte Bank v. Holley, 219 U. S. 121, 31 Sup. Ct. 189, 55 L. ed. 123; State v. Woodmansee, 1 N. D. 246, 46 N. W. 970, 11 L. R..A. 420; Idaho Power & L. Co. v. Blomquist, 26 Ida. 222, Ann. Cas. 1916E, 282, 141 Pac. 1083; 28 Cye. 131, notes 10-12; Idaho Const., sec. 3, art. 11; 12 C. J. 991, 1003, note 54, 1197.)
    The petitioner by its acts has elected to abide by the law complained of. (Noble State Bank v. Haskell, supra; Assaria State Bank v. Holley, supra; 7 C. J. 630, 631; Eaesemeyer v. Smith,' 22 Ida. 1, 123 Pac. 943, 43 L: R. A., N. S., 100; Yellowstone Comity v. First Trust & Sav. Bank, 46 Mont. 439, 128 Pac. 596; State v. Thum, 6 Ida. 323, 55 Pac. 858.)
    “Respondent could not be heard to question the right of the state to exercise its police power on the ground that by so doing the state would impair the obligation of contract.” (Sandpoint Water <& Light Co. v. City of Sand-point, supra.)
    
    The true exercise of police power is never embarrassed by the constitutional prohibitions against impairing the obligation of contracts and taking property without due process of law. (12 C. J. 991, 1197.)
    
      In order for a contract to receive the benefit of the constitutional provision relative to the impairment of obligation, it must be valid in its inception. It can never have such benefit when it is the attempted contract between two wrongdoers. (12 C. J. 1052, 1053; State v. Griffin, 83 Conn. 1, 74 Atl. 1068; Nolle v. Davidson, 177 Ind. 19, 96 N. E. 325.)
    Nor does the constitutional provision extend to contractual relations which are not those of the parties themselves but which are imposed by law without the assent of the party bound. Such contracts are quasi contracts and therefore are not protected. (12 C. J. 1053, sec. 691; State of Louisiana v. City of ■New Orleans, 109 U. S. 285, 3 Sup. Ct. 211, 27 L. ed. 936.)
    Tannahill & Deeper, for Respondent.
    A highway district is a municipal corporation. (Sec. 1505, C. S.; Shoshone Highway Dist. v. Anderson, 22 Ida. 109, 125 Pae. 219.)
    The title to this money is vested in the highway district in trust for the uses and purposes for which it was raised. (See. 1512, C. S.)
    As to vested rights in property and contract rights, the highway district is protected by the constitutions of the United States and of the state of Idaho. (12 C. J. 1008, par. 632; Grogan v. City of San Francisco, 18 , Cal. 590; Board of Comm-rs. of Tippecanoe County v. Lucas, 3 Otto (U. S.), 108, 23 L. ed. 822; Greene v. Niagara, 55 App. Div. 475, 67 N. Y. Supp. 291; Board of Education v. Blodgett, 155 111. 441, 46 Am. St. 348, 40 N. E. 1025, 31 L. R. A. 70; Milam Co. v. Bateman, 54 Tex. 153, 166; Mi. Hope Cemetery v. Boston, 158 Mass. 509, 512, 35 Am. St. 515, 518, 33 N. E. 695; State v. Foley, 30 Minn. 350, 357, 15 N. W. 375; Wooster v. Plymouth, 62 N. H. 193, 210; Milllurn v. Village of South Orange, 55 N. J. L. 254, 26 Atl. 75.)
    This money was deposited by the highway district upon special deposit and was held in trust by the bank for the use and benefit of the highway district. (State V, Thum, 
      6 Ida, 323, 329, 55 Pac. 858; First Nat. Bank v. C. Bunting & Go., 7 Ida. 27, 59 Pae. 929, 1106; In re Bank of Nampa, 29 Ida. 166, 174, 157 Pac. 1117.)
    The existing law enters into and becomes a part of all contracts. (Long v. Owen, 21 Ida. 243, Ann. Cas. 1913D, 465, 121 Pac. 99; 6 R. C. L. 855, par. 243; 13 C. J. 560, par. 523; Armour Packing Go. v. United States, 153 Fed. 1, 82 C. C. A. 135,' 14 L. R. A., N. S., 400; Bees v. Watertown, 19 Wall. (U. S.) 107, 22 L. ed. 72; Von Hoffman v. Quincy, 4 Wall. (U. S.) 535, 18 L. ed. 403; Koshkonong v. Burton, 14 Otto (U. S.), 668, 26 L. ed. 886; Fiske v. Jefferson Police Jury, 116 U. S. 131, 6 Sup. Ct. 329, 29 L. ed. 587; United States v. Ansonia Brass etc. Co., 218 U. S. 452, 31 Sup. Ot. 49, 54 L. ed. 1107; Seaboard Airline By. Co. v. Bailroad Commission of Alabama, 155 Fed. 792; Bailey Ornamental Iron Works v. Goldschmidt, 33 Cal. App. 661, 166 Pac. 363; Western Lumber & Pole Go. v. City of Golden, 23 Colo. App. 461, 130 Pac. 1027; Lynch v. Baltimore & O. S. W. B. Co., 240 111. 567, 88 N. E’. 1034; Metropolitan Life Ins. Go. v. Johnson, 49 Ind. App. 233, 94 N. E. 785; Graves v. Howard, 159 N. C. 594, Ann. Cas. 1914C, 565, 75 S. E. 998; Enight v. Glinkscales, 51 Okl. 508; 152 Pac. 133; McCaskill v. Union Naval Stores Go., 59 Fla. 571, 52 So. 961; Eessler v. Glayes, 147 Mo. App. 88, 125 S. W. 799; Watkins & Go. v. Eobiela, 84 Neb. 422, 121 N. W. 448; People v. Metropolitan Surety Co., 211 N. Y. 107, 105 N. E. 99; Id., 159 App. Div. 929, 143 N. Y. Supp. 1136; Manvell v. Weaver, 53 Wash. 408, 102 Pac. 36; Pross v. Excelsior Gleaning & D. Go., 110 Misc. Rep. 195, 179 N. Y. Supp. 176; Lorando v. Gethro, 228 Mass. 181, 117 N. E. 185, 1 A. L. R. 1374.)
    Rules of property as laid down by the highest courts of the state existing at the time a contract is made are an integral part of it. (13 C. J. 561, par. 523; Graves County Water Go. v. Ligón, 112 Ky. 775, 66 S. W. 725; Mercantile Trust éte Go. v. Columbus, 161 Fed. 135.)
    
      The remedy is a part of the contract and cannot be impaired. (Edwards v. Kearsey, 96 U. S. 595, 24 L. ed. 793; Bees v. Watertown, supra; Wilder v. Gmupbell, 4 Ida. 695; 43 Pac. 677; Welsh v. Gross, 146 Cal. 621, 106 Am. St. 63, 2 Ann. Cas. 796, 81 Pac. 229.)
    A special deposit is a bailment, title to which remains in the depositor and which is held in trust for him. (3 R. C. L. 517, par. 146; Bolles on'Modern Law of Banking, p. 434, par. 436; Morse on Banks and Banking, p. 423, par. 190.)
    The status of the deposit was fixed when made. (Harris v. Walker, 199 Ala. 51, 74 So. 40; Walker v. J. B. McCrary Go., 197 Ala., 638, 73 So. 342.)
    This contract of special bailment cannot be impaired by a subsequent legislative act. (Sec. 10, art. 1, U. S. Const.; sec. 16, art. 1, Idaho Const.; Fletcher v. Peck, 6 Craneh (U. S.), 87, 3 L. ed. 162; 6 E. C. L., par. 314; State v. Buttzville State Bank, 26 N. D. 196, 144 N. W. 105.)
    Sec. 13, chap. 14, 1921 Sess. Laws, impairs the obligation of this contract. (12 C. J. 1056, par. 699, 1057, par. 702 and 703; 7 E. C. L. 324, jar. 313.)
    Jas. F. Ailshie, Amicus Curiae.
    
    Prior to the last session of the legislature there was no lawful way for the funds of a highway district to reach the vaults of a bank under a general deposit. Any money the bank had on general deposit from the district was acquired in violation of law and both the officer of the district depositing it and the officer of the bank receiving it were guilty of a felony, and the title to the money could not pass under such circumstances. (In re Bank of Nampa, 29 Ida. 166, 157 Pac. 1117.)
   BUDGE, J.

This action was brought by respondent, in accordance with the provisions of sec. 11, p. 60, chap. 42, Sess. Laws, 1921, to enforce a trust in the sum of $16,191.43 upon the general funds and estate of the Fidelity State Bank of Orofino.

The facts in this case are stipulated, as follows:

“1. That the petitioner herein, the North Fork Highway District, is a highway district and a public corporation organized and existing under and by virtue of the provisions of chapter 66 of the Compiled Statutes of the state of Idaho.
“2. That one, M. LeBaron, was at all times in this petition and answer mentioned, the duly constituted, appointed, qualified and acting treasurer of the said North Fork Highway District. That as such treasurer all funds belonging to the said highway district during his incumbency have come into his possession and control.
“3. That prior to the 8th day of April, 1921, the Fidelity State Bank of Orofino was a banking corporation organized and existing under and by virtue of the laws of the state of Idaho, and engaged in the general banking business in said state, with its principal place of business at Orofino, Idaho.
“4. That on September 1st, 1920, there was on deposit in the Fidelity State Bank of Orofino, certain moneys which had been derived by the said highway district from the sale of highway bonds theretofore duly and legally issued and sold as provided by the provisions of chapter 66 of the Compiled Statutes of the state of Idaho, which said funds were obtained for the purpose of improving and building roads and highways within the North Fork Highway District. That the said funds were deposited by M. LeBaron as secretary-treasurer of the said North Fork Highway District, and the said deposit was carried by the said bank under the following title: ‘North Fork High. Dist. Imp. Fund, M. LeBaron, Sec’y-Treas., Cavendish, Idaho.’ That on September 1st, 1920, the said deposit amounted to the sum of $17,383.65. That thereafter on or about the 8th day of September, 1920, there was withdrawn from the said North Fork Highway District improvement fund deposit the sum of $10,000.00, which said sum was deposited in the same bank upon time certificates of deposit; . . . . That the said $10,000 so evidenced by the said certificates of deposit was a credit in favor of this applicant in the said bank at the time of the closing of its doors on to wit: the 8th day of April, 1921. That on April 8th, 1921, there was dne as accrued interest on said certificates of deposit the sum of $333.28. That thereafter between the 1st day of September, 1920, and the 8th day of April, 1921, certain funds derived from the sale of bonds from the said highway district were deposited by the said M. LeBaron, secretary-treasurer of the highway district, to the credit of the North Fork Highway District improvement fund in the said bank and certain funds were withdrawn by him from time to time for purposes for which the said fund was created, leaving a balance due to the credit of the said improvement fund on the 8th day of April, 1921, in the sum of $5,228.77.....That all deposits and withdrawals from the said improvement fund account were with the full knowledge on the part of the said bank that all such transactions were in the name of and for the use and benefit of the said highway district.
“5. That on or about the 8th day of April, 1921, the said Fidelity State Bank of Orofino closed its doors and suspended payment, at which time and ever since such bank has been, and is now, insolvent.
“6. That on or about the 8th day of April, 1921, J. Gf. Fralick, Commissioner of Finance of the state of Idaho, pursuant to chapter 42 of the Laws of 1921, closed the said Fidelity State Bank of Orofino, took possession of all of the books, records, assets, and business of every description of said bank and caused to be made an examination of the affairs of said bank for the purpose of liquidating its assets, paying off its creditors and winding up its affairs; that pursuant to said statute he appointed Oliver H. Holmberg, of Orofino, Idaho, his agent to assist him or act for him in the performance of his powers and duties under said statutes and that on the day when the petition herein was served on him the said Oliver H. Holmberg was, and still is, the agent in charge of said bank, acting for said Commissioner of Finance of the state of Idaho; that at the time of so taking over the said bank there was on deposit to the credit of the North Fork Highway District Improvement fund the sum of $5,228.77 in a checking account, and two deposits of $5,000 each dated August 30th, 1920, evidenced by time certificates, ....
“7. That demand has been made upon the said respondent that he pay to this applicant the sums hereinbefore set forth, but he has at all times refused and still refuses to pay the same or any part thereof.
“8. That a claim for preference and to establish this deposit as a. special trust fund was duly made to the commissioner of finance, .... That the said commissioner rejected said claim for preference and placed it in the lower order of priority as established by subdivision 3, of section 13 of chapter 42 of the Session Laws of Idaho for 1921. That the said commissioner intends, unless otherwise ordered, by this court, to compel this applicant to share pro rata in the distribution of the funds of said defunct .bank, with all other depositors under the provisions of the said subdivision 3.
“9. It is further stipulated and agreed that each of the said deposits made by the highway district as hereinbefore set forth was a tona fide deposit, and that the actual cash in the amounts as stated was actually and in fact deposited in the said Fidelity State Bank of Orofino at the times as herein alleged; that after being deposited in the said bank, the said cash was mixed and commingled by the said bank with its general funds, increased and augmented the same to the, amount of said deposits and thereby swelled the assets of the said bank to that extent; that after being so deposited and received by the said bank, the said money was thereafter used in the regular course of business by the said bank.”

The cause was tried to the court without a jury. Judgment was had for the respondent, from which judgment this appeal is prosecuted.

Appellant makes and relies upon tlie following assignments of error:

“1. The court erred in holding that sections 13 and 33 of chapter 42 of the laws of 1921 are unconstitutional and void so far as they affect the petitioner.
“2. The court erred in granting judgment against the Fidelity State Bank of Orofino in the sum of $15,228.77.
“3. The court erred in declaring, creating and imposing upon the assets of the Fidelity State Bank of Orofino a trust in favor of the North Fork Highway District in the total amount of $15,228.77, and in holding said amount to be preferred and entitled to immediate payment out of the funds of said bank.
“4. The court erred in decreeing that J. G-. Fralick pay from the funds of said bank as soon as available the total amount of the judgment of $15,228.77.
“5. The court erred in restraining and enjoining J. Gr. Fralick from disposing of the estate of said bank in any manner until the preferred claim of the North Fork Highway District is fully paid and satisfied.
“6. The court erred in granting the petitioner posts in the sum of $10,000.”

In our opinion this case may be disposed of under appellant’s first assignment of error, and in discussing this case we desire to be understood as disposing of the questions involved on this appeal only in so far as they involve the particular deposit made by the petitioner, and the application of the law to that deposit, and not as to deposits made subsequent to the passage of chapter 42 of the Laws of 1921.

From the facts stipulated it appears that all of the deposits were made prior to February 28, 1921, upon which date chapter 42 of the Session Laws of 1921 went into effect. It also appears that the highway district was the owner of the funds’ involved in this litigation, and that they were deposited with the Orofino bank by its treasurer, wrongfully and illegally, and were received by the officials of the bank, wrongfully and illegally, and that both the treasurer and the officials of the bank, in the deposit and receipt of these funds violated the provisions of section- 8379 of the Compiled Statutes, which read as follows:

“Each officer of this state, or of any' county, city, town or district of this state, and every other person charged with the receipt, safekeeping, transfer or disbursement of public moneys, who either: ....
“4. Deposits the' same or any portion thereof in any bank, or with any banker or other person, otherwise than on special deposit, or as otherwise authorized by law; . . . .
“Is punishable by imprisonment in the state prison for not less than one nor more than ten years, and is disqualified from holding any office in this state.”

This statute expressly prohibited a highway district treasurer from depositing the funds of a highway district in banks other than upon special deposit. Neither did the state depository law prior to the last session of the legislature apply to highway districts. There was no lawffil way for the funds of the highway district to reach the vaults of the bank under general deposit, and any bank receiving such funds other than upon special deposit acquired the same in violation of the provisions of C. S., see. 8379. (In re Bank of Nampa, 29 Ida. 166, 157 Pac. 1117.)

Prior to the enactment of chap. 42, Sess. Laws 1921, this court held that although public moneys were deposited other than upon special deposit, they remained nevertheless a trust fund, and in case of the insolvency of the bank it was the duty of the receiver to treat such funds as a trust fund and the property of the true owner, and that creditors of such bank were not to share pro rata in the public moneys so deposited. (State v. Thum, 6 Ida. 323, 55 Pac. 858.) And again in the case of First Nat. Bank v. C. Bunting & Co., 7 Ida. 27, 59 Pac. 929, 1106, it was held that public moneys deposited in a bank in violation of law are trust funds and do not become the property or assets of such bank, and remain trust funds, with the title in the true owner after the appointment of a receiver of the insolvent bank, and that a county whose funds have been unlawfully deposited in a bank is not estopped from claiming such funds. In the case of In re Bank of Nampa, supra, the cases of State v. Thum and First Nat. Bank v. C. Bunting & Co. are followed and approved.

Prior to the enactment of chap. 42, supra, the moneys of the district, illegally deposited in the bank upon general deposit, remained the property of the district, and the title did not pass to the bank, neither did the relationship of debtor and creditor arise between the bank and the district. In the instant ease the moneys deposited by the treasurer of the North Fork Highway District were a special deposit, although made as a general deposit, to be held by the bank in trust for the use of the true owner. The law imposed this relationship, and neither the illegal act of the treasurer of the district nor the officials of the bank by placing this money upon general deposit created any other status than that of bailor and bailee, and had the bank become insolvent at any time prior to February 28, 1921, under the former decisions of this court, these funds being impressed with a trust, would, have been preferred funds and payable out of the assets of the bank, prior to the payment of depositors, stockholders or other creditors of the insolvent bank.

When these funds were deposited with the bank by the treasurer of the district, a contract of special deposit was made; the district being a municipal corporation (C. S., sec. 1505; Shoshone Highway Dist. v. Anderson, 22 Ida. 109, 125 Pac. 219), had the power to make this particular contract and none other. When this money was collected from the taxpayers it vested in the highway district in trust for the use and purposes for which it was raised, and could not under the law as it then existed be lawfully diverted to any other use or purpose. The district had a vested right in this contract of special deposit made by its treasurer.

The statutes of this state (Long v. Owen, 21 Ida. 243, Ann. Cas. 1913D, 465, 121 Pac. 99, 6 R. C. L. 855, par. 243, 13 C. J. 560, par. 525), as well as the decisions of this court, became a part of the contract of special deposit when the deposit was made.

In the case of Von Hoffman v. Quincy, 4 Wall. (U. S.) 535, 18 L. ed. 403, the court said: “It is also settled that the laws which subsist at the time and place of the making of a contract, and where it is to be performed, enter into and form a part of it, as if they were expressly referred to or incorporated in its terms. This principle embraces alike those which affect its validity, constructions, discharge, and enforcement.” (Green v. Biddle, 8 Wheat. 92, 5 L. ed. 547; Bronson v. Kinzie, 1 How. (U. S.) 319, 11 L. ed. 143; McCracken v. Hayward, 2 How. 608, 612, 11 L. ed. 397; People v. Bond, 10 Cal. 563, 570; Ogden v. Saunders, 12 Wheat. (U. S.) 213, 231, 6 L. ed. 606. See, also, Koshkonong v. Burton, 14 Otto (U. S.), 668, 26 L. ed. 886.)

The status of the deposit was fixed when it was made. (Harris v. Walker, 199 Ala. 51, 74 So. 40; Walker v. J. B. McCrary Co., 197 Ala. 638, 73 So. 342.)

We come, therefore, to the important question in this case, viz., “Was it within the constitutional power of the legislature to abrogate the contract of special deposit between the district and the bank?” This the legislature undertook to do by the passage of subdivision 3 of section 13 of chapter 42, Session Laws 1921, which reads as follows :

“(3) Debts due depositors, including protest fees paid by them on valid cheeks presented after closing of the bank or trust company, pro rata; All deposits of public funds of every kind or character (except those actually placed on special deposit under statutes providing therefor), including those of the United States, the state of Idaho, and every county, district, municipality, political subdivision or public corporation of this state, whether secured or unsecured, are included within the terms of this subdivision and take the same priority as debts due any other depositor; anything in the statutes of the state of Idaho to the contrary notwithstanding. ’ ’

It is the contention of the respondents that the foregoing subdivision of sec. 13, chap. 42, is .unconstitutional and void, in so far as it affects this particular deposit, for the reason that it impairs the obligation of a contract, and is in contravention of sec. 10, art. 1 of the constitution of the United States, and sec. 16, art. 1 of the constitution of the state of Idaho, which provide that:

U. S. Const., sec. 10, art. 1: “No state shall .... pass any .... law impairing the obligation of contracts . . . .
Idaho Const., sec. 16, art. 1: “No ... . law impairing the obligation of contracts shall ever be passed.”

If subdivision 3, supra, impaired the obligation of the special deposit theretofore existing between the district and the bank, the act in so far as it affects this particular deposit is unconstitutional and void.

What constitutes the impairment of a contract is stated in 12 C. J., p. 1056, par. 699, as follows:

“'Any enactment of a legislative character is said to ‘impair’ the obligation of a contract which attempts to take from a party a right to which he is entitled by its terms, or which deprives him of the means of enforcing such a right. ’ ’
“A law enacted subsequent to a contract which, if valid, will have the effect of annulling the contract constitutes the most palpable form of legislative impairment, and sucn an enactment is clearly unconstitutional.” (12 C. J., p. 1057, sec. 702.)
“Legislation that attempts to make material alterations in the character, terms, or legal effect of existing contracts is clearly void. Of this character are statutes which attempt to add a material condition or provision to a contract, and those which attempt to release material stipulations contained therein.” (12 C. J., pp. 1057, 1058, see. 703.)

The commissioner of finance under the provisions of subdivision 3, supra, attempted to abolish the contract of special deposit made prior to the enactment of said section, by treating the same as a general deposit, and by attempting to distribute the funds of the district pro■ rata among the depositors and other creditors of the bank. In other words, the commissioner is attempting to substitute a simple contract of debtor and creditor between the bank and the district, instead of a contract of bailment, and to defeat the remedy of the district against the bank by denying to the district the right to impress these funds with a trust and the right of priority, by requiring the highway district to pro rate with common creditors of the bank, and this we do not think he could lawfully do. . While the remedy may be modified at the discretion of the legislative body, it cannot be taken away, for the right to property necessarily implies a right to process of law to protect it. The remedy to enforce a contract is a part of the contract, and any subsequent law of the state which so affects that remedy as substantially to impair and lessen the value of the contract is forbidden by the constitution, and is therefore void. (Edwards v. Kearzey, 96 U. S. 595, 24 L. ed. 793.)

If the position taken by the commissioner is correct, the district has lost its remedy to enforce its contract of special deposit, under a former statute which prohibited the treasurer of the district from making any other than a special deposit, in force at the time the money was deposited. This action by the commissioner is sought to be justified under the provisions of a subsequent enactment. This to our minds is such an impairment of the obligation of a contract as brings it within the inhibition of sec. 10, art. 1 of the constitution of the United States, and sec. 16, art. 1 of the constitution of this state, and the subsequent statute is therefore unconstitutional in so far as it is sought to apply it to this particular contract of deposit.

Neither are we in accord with appellant’s contention that the attempted general deposit made by the treasurer of the distriét was an illegal and invalid deposit, and therefore not protected by sec. 10 of art. 1 of the constitution of the United States, and sec. 16, art. 1 of the constitution of this state. To onr minds appellant seeks to make and enforce a contract of general- deposit, which would be an illegal contract. The only contract that the treasurer of the district could make was one of special deposit and that is the contract that is sought to be enforced in this proceeding. The officials of the bank, as well as the treasurer of the district, knew when the deposit was made that the treasurer had no authority under the law as it then existed to make any other contract than one of special deposit. The bank had knowledge of the fact that these funds belonged to the highway district. They had been collected for a specific purpose, and were held in trust by the treasurer of the district for the benefit of the district, to be expended for the purposes for which they were collected. ■ The mere fact that the treasurer attempted to make a general deposit, and the further fact that the bank undertook to treat the deposit so made as a general deposit, did not operate to change the character of the deposit. Under the statutes and the decisions of this court, the contract was one of special deposit made by a public officer of public moneys. Both the treasurer of the district and the bank held these funds in trust for the district. The bank officials had no authority under the statute to commingle these funds with the general funds of the bank.

When this deposit was made the law then in force fixed the rights and liabilities of both the treasurer of the district and the bank, and under the law as it then existed the bank was in duty bound to perform the terms of the special deposit contract, which contract gave to the district the right to a performance of the contract under the law then in force. The district could be neither deprived of the right or of the remedy by any subsequent legislation, or by the illegal acts of its treasurer, to which the bank was a party. A contrary holding would be in direct violation of both the federal and the state constitution, prohibiting the impairment of any contract, either express or implied. It is a well-known fundamental rule of law that a state by the act of its legislature cannot alter the nature or legal effect of an existing contract to the prejudice of either party, nor can the legislature make a law for a particular case between two contracting parties contrary to the existing law and require the courts to enforce it. This rule is founded on two distinct principles of constitutional law, one prohibiting the assumption of judicial power by. the legislative department, and the other inhibiting the impairment by a state of the obligation of contracts. The obligation of a contract is impaired by a statute which alters its terms, by imposing new conditions or dispensing with conditions, or which adds new duties or releases or lessens any part of the contract obligation or substantially defeats its ends. It is not only private contracts that are protected from impairment by state law. The protection also extends to contracts made by a state or a municipal corporation.

In disposing of this ease as we have done, we are not unmindful of the many serious questions of far-reaching effect which have been so thoroughly briefed and ably argued by counsel appearing on both sides, and they are to be commended for their efforts in behalf of the parties they represent.

We have carefully examined the record and the authorities cited and after a careful consideration we have reached the conclusion that the one controlling question in so far as the deposit involved in this controversy is concerned is properly disposed of in this opinion.

The judgment of the trial court is affirmed. It is so ordered. Costs are awarded to respondent.

McCarthy, Dunn and Lee, JJ., concur.

Petition for rehearing denied.  