
    RED RIVER VALLEY BANK v. CRAIG.
    ERROR TO THE SUPREME COURT OE THE STATE OE NORTH DAKOTA.
    No. 231.
    Argued and submitted April 11, 1901.
    Decided May 13, 1901.
    There is no such difference in the several statutes of North Dakota, so far as regards the rights of the parties, as to forbid the application of the latest statute to a case where a mortgage was forgiven, and the materials furnished prior to its passage; and the legislation under review cannot be held to violate any rights of the plaintiff in error, protected by the Constitution of the United States.
    A mortgage which is subsequent' to the right of subsequent lienors who furnish máterials or labor in the erection of a building to sell the same,, and have it removed for the payment of the liens, is not reduced in value by a statute authorizing the sale of the property such as is set forth in the opinion of the court.
    This action was brought to enforce certain mechanic’s liens provided for by section 4796, Revised Code of North Dakota, upon real estate described in the complaint. The trial resulted in a judgment in favor of the lienors, which on appeal was affirmed by the Supreme Court of the State, and the Red River Talley National Bank of Fargo, one of the defendants below, has brought the case here by writ of error.
    The trial court found the following facts: On July 8, 1884, Elvira Cooper was the owner of the property, being lot 6, block 5, of the original townsite of Fargo, Cass County, North Dakota, and on that day she, with her husband, mortgaged it to secure the payment of the sum of $3000 to the Travelers’ Insurance Company of Hartford, Connecticut. Prior to January 1, 1893, the mortgagor sold and conveyed the property, subject to the mortgage, to one Rosa Herzman, .who remained the owner until the foreclosure of the mortgage under the statute and the sale of the property to the insurance company, which took place on May 7,1894, and on that day a sheriff’s certificate of sale was issued to it. On January 12, 1895, the insurance company assigned this certificate of sale to the plaintiff in error, and on May 17, 1895, it received from the sheriff a deed of the premises. During the time of the ownership of the property by Rosa Herzman she erected upon the lot a- two story and basement brick building, which was completed by February 3, 1894, and which still remains on the lot in good condition. During the summer and fall of 1893 various work was done and materials furnished upon and for the building for which the owner of the premises failed to pay in full, and thereafter and between November 17,1893, and February 2,1894, various persons who had furnished materials or performed work and labor for and in the erection of the house filed their liens, and subsequently, on November 15,1898, commenced this action to foreclose the samé-against (among others) the plaintiff in error as the owner of the property.
    It was also found by the court that the east and west walls of this new two story brick building were party walls, the east wall' standing equally upon its own and the adjoining lot, while the west wall stood wholly upon its adjoining lot, and the walls were built-in pursuance of .an agreement to that effect between the owners of the different lots, so that the building in question and those on each side constituted a solid row of three brick buddings belonging to different owners, and the building was incapable of being removed from the lot unless it were first torn down. It was also found that it" would be for the best interest of all parties that the land and the improvements thereon should be sold together, and that the land and the improvements were of equal value, each one being at least of the value, of $2500. The judgment, after adjudging the amounts .of the liens- of the various parties, gave the plaintiff in error the privilege of paying the same within thirty days from the service’ of a copy of ■ the judgment, and in- default, after proper noticé, the property was directed to be sold by the sheriff of Cass County, and of the moneys received therefor one half was directed to he paid and delivered to the plaintiff in error and from the other half the lienors were to be paid, and if there were any excess after such payment it was to be paid over to the bank.
    At the time of the execution of the mortgage the mechanic’s lien law then in existence was known as chapter 31 of- the Code of Civil Procedure, as found in the Eevised Codes of 1877. Sections 655, 666 and 667 are set out in the margin.
    
    At the time when the work was done upon and the materials furnished for the erection of the house the mechanic’s lien law in force is to be found from sections 5468 to 5485, Compiled Laws, N. D. 1887. Section 5469 is the same as section 655, of chapter 31, above mentioned, with the exception of an immaterial addition at the end of the section, while section 5480 is identical with section 666 of that chapter. Section 5481 is a substitute for section 667 of the same chapter, and is set forth in the margin.
    
    
      It is evident that the law was in substance the same on this subject when the mortgage was executed and when the work was done and the materials furnished.
    The mechanic’s lien law in existence at the time that this action was brought is to be found from sections 4788 to 4801, Revised Code of 1895. Section 4788 would seem to be a sub-' stitute for section 655 of chapter 31, above mentioned, and section 4795 is a substitute for section 666 of the same chapter. These sections are placed in the margin.
    
    
      Mr. Ira B. Mills for plaintiff in error. Mr. William G. Messer and Mr. Ernest B. Mills were on his brief.
    
      Mr. Samuel B. Pinney for defendants in error submitted on his brief, on which were Mr. G. W. Newton, Mr. E. II. Smith, Mr. J. B. Benton, Mr. V. B. Lovell and Mr. G. L. Bradley.
    
    
      
       Chapter 31, Code of Civil Procedure of the Eevised Codes of 1871, Territory of Dakota.
      Sec. 655. Lien, to whom, and for what. — Every mechanic, or other person who shall do any labor upon, or furnish any materials, machinery or fixtures for any building, erection or other improvements upon land, including those engaged in the construction or repair of any work of internal improvement, by vilque of any contract with the owner, his agent, trustee, contractor or subcontractor, upon complying with the provisions of this chapter, shall have for his labor done, or materials, machinery or fixtures furnished, a lien upon such building, erection or improvement and upon the land belonging to such owner, on which the same is situated, to secure the payment of such labor done, or materials, machinery or fixtures furnished.
      Sec. 666. Lien superior to mortgage, when. — The lien for the things aforesaid, or work, shall attach to the buildings, erections or improvements, for which they were furnished or done, in preference to any prior lien or incum-brance, or mortgage upon the land upon which the same is erected or put, and any person enforcing such lien, may have such building, erection or other improvement sold under execution, and the purchaser may remove the same within a reasonable time thereafter.
      Sec. 667. Action to enforce. — Any person having a lien by virtue of this chapter may bring an action to enforce the same in the district court of the county or judicial subdivision wherein the property is situated.
    
    
      
       Compiled Laws, Territory of Dakota, 1887. (See section 667, supra.)
      
      Sec. 5481. Any person having a lien by virtue of this article may bring an action to enforce the same in the district court of the county or judicial subdivision where the property is situated, and any number of persons claiming liens against the same property may join in the same action, and when separate actions are commenced the court may consolidate them. The court may also allow as part of the costs the money paid for filing each lien and the sum of five dollars for drawing the same.
    
    
      
       Chapter 77, Revised Codes, North Dakota, 1895.
      Sec. 4788. Who may have and for what. — Any person who shall perform any labor upon or furnish any materials, machinery or fixtures for the construction or repair of any work of internal improvement or for the erecting, alteration or repair of any building or other structures upon land, or in making any other improvement thereon, including fences, sidewalks, paving, wells, trees, drains, grades or excavations under a contract with the owner of such land, his agent, trustee, contractor or subcontractor, or with the consent of such owner, shall upon complying with the provisions of this chapter have for his labor done, or materials, machinery or fixtures furnished a lien upon such building, erection or improvement, and upon the land belonging to such owner on which the same is situated, or to improve which the work was done or the things furnished, to secure the payment for such labor, materials, machinery or fixtures. The owner shall he presumed to have consented to the doing of any such labor or the making of any such improvement, if at the time he had knowledge thereof and did not give notice of his objection thereto to the person entitled to the lien. The provisions of this section and chapter shall not be construed to apply to claims or contracts for furnishing lightning rods or any of their attachments.
      
        Sec. 4795. When prior to prior lien on land. Power of court. — The liens for the things aforesaid or the work, including liens for additions, repairs and betterments, shall attach to the building, erection or improvement for which they were furnished or done in preference to any prior lien or incum-brance or mortgage upon the land upon which such erection, building or improvement belongs or is erected or put.
      If such material was furnished or labor performed in the erection or construction of an original and independent building, erection or other improvement commenced since the attaching of such prior lien, incumbrance or mortgage, the court may in its discretion order and direct such building, erection or improvement to be separately sold under execution, and the purchaser may remove the same within such reasonable time as the court may fix. But if in the opinion of the court it would be for the best interest of all parties that the land and the improvements thereon should be sold together, it shall so order, and the court shall take an account and ascertain the separate values of the land and of the erection, building or other improvement, and distribute the proceeds of sale so as to secure to the prior mortgage or other lien priority upon the land, and to the mechanic’s lien priority upon the building, erection or other improvement.
      If the material furnished or labor performed was for an addition to, re-' pairs of or betterments upon buildings, erections or other improvements, the court shall take an account of the values before such material was furnished or labor performed, and the enhanced value caused by such additions, repairs or betterment's, and upon the sale of the premises distribute the proceeds of sale so as to secure to the prior mortgage or lien priority upon the land and improvements as they existed prior to the attaching of the mechanic’s lien and to the mechanic’s lien priority upon the enhanced value-caused by such additions, repairs or betterments.
    
   Me. Justice Peckham,

after making the above statement, of facts, delivered the opinion of the court.

The Federal question in this case arises because of the legislation of North Dakota subsequent to 1884, the time of the execution of the mortgage to the Travelers’ Insurance Company, the plaintiff in error contending that by reason of such legislation its rights, with reference to the property herein, have to some extent been taken away or unfavorably affected, without due process of law, and it also contends that the subsequent legislation operated to impair the obligation of a contract arising out of the execution of the mortgage already mentioned, its foreclosure and the sale of the property to the insurance company, and its assignment to the plaintiff in error.

¥e think it was the legislative intent that the last statute should apply to past transactions and that no substantial rights of the plaintiff in error are thereby unfavorably affected,-because, in our opinion, there .is no such material difference in the several statutes, so far as regards the rights of the parties, as to forbid the application of the latest statute to a case where the mortgage was given and the materials furnished prior to its passage. The. difference between that statute and its predecessors, so. far as relates to the point in question here, has special reference to the remedy only and to the manner of executing the provisions of the statute in force at the time of the execution of the mortgage and also when the work was done and the materials furnished. It in reality solely affects the remedy, and does not thereby substantially alter those rights of the mortgagee or his representatives which existed when the mortgage was made. A mechanic’s lien law was then in existence, and the mortgage was taken subject to the right of the legislature, in its discretion, to alter that law, so long as the alterations only affected the means of enforcing an existing lien, while not in substance enlarging its extent or unduly extending the remedy to the injury of vested rights. So long as those rights remain thus unaffected the subsequent statute must be held valid, although the remedy be thereby to some extent altered and enlarged. Looked at in this light, the legislation under review cannot be held to violate any rights of the plaintiff in error protected by the Constitution of the United States.

Section 655 of the old act provided for the lien- and gave it' to those persons who performed labor upon or furnished materials for a building, upon complying with the provisions of the chapter, (31). Section 666 provided for the enforcement of the- lien in certain cases, and granted the right to any person having a lien to enforce the sale of the building, and to the purchaser the right to remove the same within a reasonable time. These two sections are reproduced in substantially the same language in the act of 1881, (in force when the work was done,) as sections 5469 and 5480 of the Compiled Laws of 1887, there being an immaterial addition in section 546.9 to section 655, whose place it takes.

By the lav? of 1895, which was in force when this action was • commenced', the old section 655 is somewhat elaborated by section 4788 of the Be vised Code of that year, but the substance of the old section, so far as the facts of this case touch it, remains the same in the new section.

Old section 666 is amended by section 4795, Eevised Code, which provides more in detail for the carrying out of the provisions of the old section. The old section itself provided for the. enforcement of the lien which was given by that statute, and the last statute it must be remembered neither created nor extended that lien, but somewhat amplified the means to enforce or discharge it. By this alteration the prior statute was not altered to the disadvantage of the owner or his mortgagee in regard to those rights which the person furnishing the materials or performing the labor had under such prior statute. In that prior statute it was provided that the lien for the work done or materials furnished should attach to the buildings, erections or improvements for which they were furnished or done in preference to any prior lien or incumbrance or mortgage upon the land upon which the same was erected or put, and any person enforcing such lien was granted the right to have the building, erection or other improvement sold under execution, and the purchaser had the right to remove the same within a reasonable time.

By the last act (section 4795) the same right still exists; the building may be sold separately and the purchaser may remove the same. There is added, however, the further provision which permits the court for the best interests of all the parties to sell the land and the improvements together, and after ascertaining the separate values of the land and of the building, provision is made for the distribution of the proceeds of the sale so as to secure to the prior mortgage or other lien priority upon the land and to the mechanic’s lien priority upon the building into which his labor or materials have entered.

True it is that the property was sold under the foreclosure when there was no right to sell the land in connection with the building for the purpose of paying the liens on the latter.. The liens on the building, however, were there, and the building could be sold and removed to pay tbe amount thereof, and under the foreclosure the purchaser bought subject to that existing right. He thus obtained a title under which his building could be sold from under him and removed from the land. Under the amended statute the court may sell all the property, land and building together,, and return to the owner the value of the land and the surplus arising from the building after payment of the liens. As the liens were in • existence when the mortgage was foreclosed, we think the purchaser took title subject to the right of the legislature, in making a reasonable and proper amendment of the law, to provide in foreclosing the liens, for the sale of the whole property and the return to the owner of the lot of the full value thereof in money, instead of allowing him to. keep the lot and have the building thereon sold and removed. The plaintiff in error’s property was already in the grasp of the statute creating the liens when the mortgage was foreclosed, and that fact is the material one for consideration with reference to the statute and its amendment.

The plaintiff in error asserts that this change in the law rendered the mortgage security less valuable, and that, therefore, it impaired the obligation-of the contract and was void. This is mere assertion, and we do not assent to its correctness. A mortgage which is already subject to the right of subsequent lienors, who furnish materials or labor in the erection of a building, to sell the same and have it removed for the payment of the liens, is not in our judgment reduced in value • by the provision contained in the amendment under consideration.

Some reference has been made to a decision of the Supreme Court of North Dakota, decided before the foreclosure of the mortgage, and it has been said that it is therein decided that section 5480 of the Compiled Laws of 1887, which, as wé have stated, is identical with section 666 of chapter 31, above mentioned, (in force when the mortgage was executed,) does not give any lien as against a mortgagee or one representing him in a case like this, because such lien could not be enforced without a demolition of the building, and in such case no lien is given, while by the - latest statute it is asserted that the lien is given, and also an effective means of enforcing it. In brief, it is urged that a lien is given by the last statute as against a mortgagee or his representative, in a case where it did not exist when the mortgage was made, as the Supreme Court of the State decided, and that such decision had been given when the mortgage was foreclosed and the property bid in by the mortgagee and then assigned to the plaintiff in error, and it is claimed that the subsequent statute giving the lien was a clear violation of the contract as against the plaintiff in error. James River Lumber Company v. Danner, 3 N. D. 470, is the authority referred to for this contention, but an examination of the facts and the opinion of the court therein shows that no such proposition was decided. In that case there was a mortgage upon the whole of the property, which consisted of a lot with a brewery erected thereon. A fire occurred which to some extent damaged, without destroying, the building. It was therefore repaired, and for the materials for such repairs and for the labor expended on the building lions were filed, and the claim was made that they were liens superior to the mortgage thereon at the time the materials were furnished and the labor performed. This the court held was not the true construction of section 5480 ; that while that section gives the lienor the right to sell the building and the purchaser the right to have it removed, yet, no authority was given to sell the entire building to pay the lien of one who had only repaired it while a recorded mortgage existed against the land at the time he made the repairs. It was said that a lien for repairs upon a building covered by a mortgage at the time of the repairs would not justify a sale and removal of the building as against such mortgage ; that priority of lien was given in cases where the whole erection might be sold and removed without unlawfully encroaching upon the right of the mortgagee of the land, and that a priority of lien existed only when a new structure had been put upon the land subsequently to the execution of the mortgage, and the one who claimed a prior lien must have contributed. to the erection of such building by the furnishing of materials or the doing of work. And the court further held that as the work on the partially.destroyed, building was not begun until some time after the recording of the mortgage on the whole property, the lienor could not procure a sale of the whole building and give to the purchaser the right to remove it, and as this could not be done as against the mortgagee, the priority of lien did not exist. The court, however, recognizes in terms the existence of a lien under that statute, when a new structure has been put upon the land subsequently to the execution of the mortgage, if the person claiming the lien has contributed to the erection of the building by furnishing materials therefor or performing labor thereon.

In this case, the building did not exist at the time the mortgage was executed, and the liens were filed to secure payment for the materials used in its construction and the labor performed upon it, and no decision of the Supreme Court of North Dakota has been called to our attention holding that under such circumstances there would not have been a lien upon the building in favor of the mechanics and prior to that of the mortgage executed before its erection. In such case as this it is clear that under the act in force when the mortgage was executed and "when the labor was performed, a lien on the building was created by virtue of that act, and that the building could have been sold under it and the purchaser would have had the right to remove it notwithstanding, in order to do so, he would have been compelled to demolish the entire building.

One of the amendments contained in the last statute, which provides a means for the enforcement of a lien by the sale of the whole premises in the case of repairs upon a building already covered by a mortgage, was probably passed because of the above, decision of the Dakota court, and we need-not concern ourselves as to its validity, because the plaintiff in error does not occupy, such a position as to enable it to raise that question, the whole building in this case having been erected subsequently to the mortgage. The same may be said as to any question which might upon other facts be raised because of the cutting off of an existing mortgage not yet due and the (claimed) impairment of the obligation of a contract by the sale of the premises .under the provisions of the amended statute.

The mortgage in this case was past due and had been foreclosed and the land sold in 1894, subject to the lien on the building provided by the statute then in existence. One who does not belong to the class that might be injured by a statute .cannot raise the question of its invalidity. Supervisors v. Stanley, 105 U. S. 305; Clark v. Kansas City, 176 U. S. 114, 118; Lampasas v. Bell, 180 U. S. 276, 283.

The amendments to the old section 667, relating to the bringing of such, an action as this, are simply of the same nature as those above discussed, amplifying to some extent, but not mate-, rially, the powers of the court as to the remedy.

The decision of the main question in this case is fatal to the rights claimed by the plaintiff in error, and the judgment must, therefore, be

Affirmed.  