The principal questions considered in the able and carefully prepared brief of counsel for the petitioner are that the detention of Eichard Watson is illegal, for that:
The act establishing the Stonewall Jackson Training School is unconstitutional, because (1) it provides for imprisonment as a punishment for crime, and in excess of that fixed by statute for vagrancy, and for such a length of time that it is cruel or unusual; (2) under it he is deprived of his liberty without due process of law; (3) that his detention, under the statute, amounts to involuntary servitude.
The duty is imposed on the courts of passing on the constitutionality of an act of the Legislature-when the question is presented, and this duty arises from the obligation to declare what the law is.
The courts recognize the principles declared in the Constitution, that it is “ordained and established” by the people of the State, and “that all political power is vested in and derived from the people,” and when a statute, which is the work of legislators, who are agents of the people, is contrary to its provisions, they sustain the will of the people as expressed in the Constitution, and not the will of their agents.
Eespectful regard, however, for a coordinate department of the Government demands that the duty shall not be lightly undertaken, and that in its performance all reasonable doubts' shall be resolved in favor of the legality of legislation.
The principle is so declared by Chief Justice Clark in Sutton v. Phillips, 116 N. C., 504, in which he says: “While the courts have the power, and it is their duty, in proper cases, to declare an act of the Legislature unconstitutional, it is a well-recognized principle that the courts will not declare that this coordinate branch of the Government has exceeded the powers vested in *350it unless it is plainly and clearly tbe ease. If there is any reasonable doubt, it will be resolved in favor of the lawful exercise of their powers by the representatives of the people”; and by Justice Holce in S. v. Baskerville, 141 N. C., 818, that “It is well established that an act of the legislature will never be -■declared unconstitutional unless it plainly and clearly appears that the General Assembly has exceeded its powers.”
Applying these rules of construction, can it be said that the act is unconstitutional ?
In determining this' question, we must consider the purpose for which the act was passed, and the grounds upon which the State can rightfully exercise the power to detain 'minor children.
It is not an unlimited and arbitrary power, and is justified only upon the idea that the child is without parental care, and that this environment is such that he may reach manhood without restraint or training and under corrupting influences, unless the State, as parens patria?, performs the duty which devolves primarily on the parent.
Outside of the humanitarian idea, which properly has its influence on courts and legislatures, and considered solely from the materialistic view, each citizen is interested in having men and women honest and law-abiding, because this conduces to the safety of his person and property; and a system which does no more than measure the days and years, which must be paid by him who has violated law, “to satisfy justice,” is a survival of the days when the only object of punishment was vengeance.
Under this system, society receives no protection, except as the example deters others from the commission of crime; no hope is held out to the convict, and he is imprisoned with other criminals with the knowledge that, in all probability, at the end of his term he will be turned loose upon society, an expert in crime.
It has always been a perplexing question how far society has the right to demand a day or an hour of his life as an example, when he has been permitted to live amid surroundings that nourish and stimulate the criminal tendency.
The purpose, of the act before us is to meet, in some measure, the duty imposed upon society, for its own jirotection and for the good of the child.
*351When we turn to the Constitution, we find that the establishment of a reformatory is not only not prohibited, but that it is expressly authorized by Article XI, sec. 4, which says: “The General Assembly may provide for the erection of house of correction, where vagrants and persons guilty of misdemeanors shall be restrained and usefully employed,” and a house of correction, “as its name indicates, is designed for the reformation of youthful criminals, those who have not yet become hardened in crime.” Ex parte Moore, 72 Cal., 11.
We are also of opinion that the power would exist without this provision of the Constitution, in the absence of a prohibition in that instrument.
If, then, the Legislature has the power to establish a reformatory, has it rightfully exercised this power, or has it, under the guise of reformation, made it possible to imprison as a punishment for crime?
If the latter construction is adopted, the restraint of the son of the petitioner is illegal, because the punishment for vagrancy, the charge made against the son, cannot exceed imprisonment, for thirty -days, under the statute now in force, - and the act under which a child might be held five years for that offense would be violative of section 14 of the Bill of Eights, which prohibits “cruel or unusual punishment.”
The question as to the extent to which a child’s constitutional rights are impaired by a restraint upon its freedom has arisen many times with reference to statutes authorizing the commitment of dependent, incorrigible, or delinquent children to the custody of some institution, and the decisions appear to warrant the statement, as a general rule, that, where the investigation is into the status and needs of the child, and the institution to which he or she is committed is not of a penal character, such investigation is not one to which the constitutional guaranty of a right to trial by jury extends, nor does the restraint put upon the child amount to a deprivation of liberty within the meaning of the Declaration of Eights, nor is it a punishment for crime.
In McLean County v. Humphreys, 104 Ill., 378, it is said: “It is the unquestioned right and imperative duty of every enlightened government, in its character of parens patrice, to *352protect and provide for tbe comfort and, well-being of sucli of its citizens as, by reason of infancy, defective understanding, or other misfortune or infirmity, are unable to take care of themselves. The performance of this duty is justly regarded as one of the most important of governmental functions, and all constitutional limitations milst be so understood and construed as not to interfere with its proper and legitimate exercise.”
And in Jarrard v. State, 116 Ind., 97, 17 N. E., 912: “We think it settled, in accordance with principle, that the Legislature has power to provide for the reformation of boys who are entering upon a career of wickedness, by prescribing measures for committing them to a reformatory institution.”
In Ex parte Ah Peen, 51 Cal., 280, it was held that proceedings resulting in the committing of a minor child to an industrial school did not deprive such child of his liberty without due process of law, such proceedings not amounting to a criminal prosecution; the Court saying: “The purpose in view is not punishment for offenses done, but reformation and training of the child to habits of industry, with a view to his future usefulness when he shall have been reclaimed to society, or-shall have attained his majority. Having been abandoned by his parents, the State, as parens patriae, has succeeded to his control and stands in loco parentis to him. The restraint imposed upon him by. public authority is in its nature and purpose the same which, under other conditions, is habitually imposed by parents, guardians of the person, and others exercising supervision and control over the conduct of those who are, by reason of infancy, lunacy, or otherwise, incapable of properly controlling themselves.”
In Reynolds v. Howe, 51 Conn., 472, it was held that a statute providing that justices of the x>eace may commit to the State Reform School any boy under the age of 16 who is in danger of being brought uj>, or who is being brought up, to lead an idle or vicious life, does not deprive such minor of his liberty without due x>rocess of law, the Court saying: “But, as we have shown, the boy is not x>roceeded against as a criminal. Nor is confinement in the State Reform School a punishment, nor in any proper sense imprisonment. It is in the nature of a paren*353tal restraint. It is a mode of education to usefulness; compulsory, but not for tbat reason improper, and tbe restraint is a necessary incident of tbe compulsory education. It is all made necessary by tbe corrupting influences that surround and are likely to control tbe boy, and by tbe need of society for protection, and tbat necessity justifies tbe proceeding. To make tbe restraint and instruction of any permanent value, they must be continued for a long time. Habits are not changed in a month, not often in a year. This is specially true of bad habits. Tbe attempt to reform viciously inclined boys would be an utter failure if limited to a few months.”
In Ex parte Liddell, 29 Pac. R., 253, tbe Court says: “There can be no question as to tbe power of tbe Legislature to provide for tbe detention and education of juvenile offenders, as it has done in this act, and tbe provisions of tbe act are not obnoxious to tbe criticism tbat it prescribes unjust or unequal penalties. It is true, tbe term of detention at tbe reform school may be made greater by tbe judgment of the court.than tbe term of imprisonment in tbe county jail or in tbe State prison, for the same offense, would be; but it cannot be said tbat tbe punishment inflicted is greater than could be put upon an adult for tbe same offense. Tbe object of tbe act is not punishment, but reformation, discipline, and education. While detained for a longer period, perhaps, than be would be if sent to the State prison or tbe county jail, tbe conditions surrounding tbe child are vastly different. He is given tbe opportunity and instruction to learn a trade and qualify himself for tbe duties of citizenship, so tbat at tbe end of bis term be will go out prepared to take care of himself, and those dependent upon him, without tbe odium which attaches to an ex-convict. There is no doubt of tbe power of tbe State to make and enforce provisions for the compulsory education of all children within tbe State; and it is equally clear tbat tbe State may arrest tbe downward tendency of those who have offended against its laws, and manifested a disposition to follow a criminal career, by placing them in an institution where they will receive the care, education, and discipline necessary to prepare them for honorable citizenship. Tbe records of tbe penal institutions of this State show tbat a large *354majority of their inmates are young men — many of them juveniles. The Legislature in its wisdom has endeavored to provide a place for children manifesting criminal traits, where they can be cared for without being thrown under the baneful influence of veterans in crime. We think the policy of the act a wise one, and we see no constitutional ground for declaring it invalid.”
In Ex parte Crouse, 4 Whart. (Pa.), 11, which was approved in Roth v. House of Refuge, 31 Md., 334, and in Jarrard v. State, 116 Ind., 98, the Court says: “The House of Refuge is not a prison, but a school. Where reformation, and not punishment, is the end, it may indeed be used as a prison for juvenile convicts who would else be committed to a common gaol; and in respect to these, the constitutionality of the act which incorporated it stands clear of controversy. . . . The object of the charity is reformation, by training its inmates to industry; by imbuing their blinds with principles of morality and religion; by furnishing them with means to earn a living, and, above all, by separating them from the corrupting influence of improper associates. To this end, may not the natural parent, when unequal to the task of education, or unworthy of it, be superseded by the parens patriae, or common guardian of the community ? It is to be remembered that the public has a paramount interest in the virtue and knowledge of its members, and that, of strict right, the business of education belongs to it. That parents are ordinarily intrusted with it is because it can seldom be put into better hands; but where they are incompetent or corrupt, what is there to prevent the public from withdrawing their privileges, held, as they obviously are, at its sufferance? The right of parental control is a natural, but‘not an inalienable one. It is not excepted by the declaration of rights out of the subjects of ordinary legislation, and it consequently remains subject to the ordinary legislative power, which, if wantonly or inconveniently used, would soon be constitutionally restricted, but the competency of which, as the Government is constituted, cannot be doubted. As to abridgment of indefeasible rights by confinement of the person, it is no more than what is borne, to a greater or less extent, in every school; and we know of no natural right to exemption from restraints which conduce to *355an infant's welfare.” There are many others to the same effect. Ex parte Ferrur, 103 Ill., 372; Refuge v. Ryan, 37 Ohio St., 203; Farnham v. Pierce, 141 Mass., 204.
In some of the statutes on this subject provision is made for the detention of the child, when the parent is unworthy, although no charge of crime is preferred, while in others the basis of the order of commitment is a verdict of guilty, and in all the principle on which the authority for legislative interference rests is that the child may be saved and that society may be protected.
It is also usual to require notice to issue to the parent, and to give him an opportunity to be heard; and when this is not done, the parent may have the legality of the detention of the child inquired into, upon a petition for a writ of habeas corpus.
Upon the hearing of such petition, he will be required to show that he has applied to the authorities in charge of his child for his release; that he was a fit and proper person to have care of the child at the time of his commitment, and is still such. When it is remembered that if he was an unworthy parent when his child was taken charge of by the State, he had abdicated his parental authority, it is not unreasonable to say to him that the interest of the child and society have become paramount, and that these must be considered in passing upon his application for the custody of the child.
Let us, then, consider the terms of the statute.
The counsel for the petitioner contends that because only persons under the age of 16, who have been convicted of a criminal offense, can be admitted to the training school, and that the judicial officer is required to sentence such person, are conclusive evidences that the institution is penal and the object punishment.
The word “convicted” is sometimes used to embrace the judgment upon a verdict of guilty, but usually it refers to the verdict itself, and it is in this sense it is used in the statute. Bugbee v. Boyce, 68 Vt., 311. That it does not include the judgment is made clear by the fact that after conviction the officer must “sentence.”
“Sentence” in its ordinary acceptation refers to a judgment of imprisonment, but it means more than this, and describes any *356judgment of a criminal court. Allen v. Delaware, 161 Pa., 550; Wright v. Donaldson, 158 Pa., 88; People v. Adams, 95 Mich., 541; Com. v. Lockwood, 109 Mass., 323.
If, therefore, these -words stood alone, the contention of the petitioner could be sustained, but imprisonment or a punishment for crime is not necessarily inferred from their use, and when considered in connection with other parts of the statute, it is a reasonable construction that conviction is merely an evidence that the child needs the care and nurture of the State, and that the sentence is an order of detention.
The act (chapter 116a, Pell’s Revisal) is entitled “Stonewall Jaekson Manual Training and Industrial School,” and it is “for the training and moral development of the criminally delinquent children of the State”; the superintendent is “intrusted with the authority for correcting and punishing any inmate thereof to the same extent as a parent may, under the law, impose upon his own child”; the judicial officer is not authorized to commit a child, under 16, because he has been convicted, but only in the event that, after conviction, he “shall be of the opinion that it would be best for such person, and the community in which such person may be convicted, that such person should be so sentenced” ; and it is made the duty of the officers in charge of the school to see that the children committed to it are instructed “in such rudimentary branches of useful knowledge as may-be suited to their various ages and capacities”; to teach them useful trades and give them manual training, and also to teach “the precepts of the Holy Bible, good moral conduct, how to work, and to be industrious.”
These are the obligations of the benign Christian parent, who does not punish or restrain the child except for its good.
We conclude, therefore, that when the act is considered as a whole, detention under its provisions is not imprisonment as a punishment for crime, and that it is constitutional.
If constitutional, the order of detention was authorized, and the courts would not discharge the child because of irregularities in the order or in the commitment. •
“The writ of habeas corpus is not designed to fulfill the functions of an appeal or a writ of error. It is not intended to bring *357into review mere errors or irregularities, whether relating to substantive rights or to the law of procedure, committed by a court having jurisdiction over person and subject-matter.” 21 Cyc., 285.
In S. v. Armistead, 106 N. C., 643, there was an irregular mittimus, and in discussing the effect of it the Court says: “The jailer, it may be, would have been authorized to refuse the prisoner until a fuller and more perfect mittimus was sent. The defendant certainly, if he chose, could have inquired into the legality of his detention in jail under it, by a writ of habeas corpus. The latter course, in this particular instance, would have availed little, however, as the judge, upon production of the justice’s judgment, must have remanded the prisoner.”
This clearly recognizes the principle that if one is restrained of his liberty under a judgment authorizing his detention, that he will not be discharged upon a petition for a writ of habeas corpus because the commitment or mittimus is irregular.
The age of the child was a material inquiry upon the hearing, and it was proper for the court to hear evidence upon it.
It is advisable for notice to be given to the parent before an order of detention is made, when this can be done, and for the order to include a finding as to notice and of the age of the child, and that it is made after investigation and because it is for the best interests of the child and of the community in which he is convicted.
Fe find no error, and the judgment of Mr. Justice Walker is
Affirmed.