Haney, J.
Respondent moves to dismiss this appeal on the 0 ground that an order appointing a referee is not appealable. The following orders, when made by the court, may be carried to the supreme court: “ (i) An order affecting a substantial right made in any action, when such order in effect determines the action and prevents a judgment from which an appeal might be taken. (2) A final order affecting a substantial right, made in special proceedings, or upon a summary application in an action for [after] judgment. (3) When an order grants, refuses, continues or modifies a provisional remedy, or grants, refuses, modifies or dissolves an injunction.; when it sets aside or dismisses a writ of attachment for irregularity; when it grants or refuses a new trial; or when it sustains or overrules a demurrer. (4) When it involves the merits of an action or some part thereof; when it orders judgment on application therefor, on account of the frivolousness of a demurrer, answer or reply, or strikes off such demurrer, answer or reply on account of the frivolousness thereof. (5) From orders made by the circuit court, vacating or refusing to set aside orders made at chambers, where, by the provisions of this act, an appeal might have been taken, in case the order so made at chambers might have been granted or denied by the circuit court in the first instance. For the purposes of an appeal from an order, either party may re*428quire the order to be entered by the clerk of record, and it shall be-entered accordingly.” Comp. Laws, § 5236. Upon an appeal from a judgment the supreme court may review any intermediate order or determination of the court below which involves the merits, and. necessarily affects the judgment, appearing upon the record transmitted or returned from the circuit court, whether the same were excepted to or not. Comp. Laws, § 5237. Whether the appointment, of a referee can be reviewed otherwise than upon an appeal from a final judgment is the only question presented by the respondent’s motion to dismiss. The foregoing statutory provisions-having been copied from the law of Wisconsin, the legislature will be presumed to have adopted the construction placed thereon by the-court of last resort in that state. Randall v. Burk Twp., 4 S. D. 337, 57 N. W. 4; Kirby v. Ramsey, 9 S. D. 197, 68 N. W. 328. This rule was followed by the territorial supreme court when it decided that the denial of an application for a change of venue was appealable as an order involving the merits of an action, supporting such conclusion with Wisconsin decisions rendered before-the adoption of the statute by the territorial legislature. White v. Railway Co., 5 Dak. 508, 41 N. W. 730. If an order denying an application for a change of venue involves the merits of an action, and is therefore subject to an independent appeal, an order appointing a referee to hear and determine all the issues is likewise appeal-able. • To hold that the order in this case is not subject to an independent appeal would be, in effect ,to overrule the decision of the territorial supreme court. The conclusion reached in its decision is clearly sustained by the Wisconsin cases cited therein, and it does not appear from any adjudications, to which our attention has been called, that the Wisconsin court would not have reached the same conclusion respecting the appointment "of referees if the ques*429tion had been raised under the same statute. That court, in 1897, rendered a decision holding that an order of reference is not appealable under chapter 212, Laws Wis. 1895. Hyde v. Bank (Wis.) 71 N. W. 659. It will be found upon examination that subsection 4, as it appears in our statute, and as it formerly appeared in the Wisconsin statute, is entirely omitted from the revision of the section relating to appealable orders enacted in 1895. Therefore the decision in Hyde v. Bank, supra, has no application to the question presented by this appeal. Respondent’s motion is denied.