
201 Or. 353 (1954)
270 P.2d 675
CASTLE
v.
GLADDEN
Supreme Court of Oregon.
Argued November 18, 1953.
Affirmed May 19, 1954.
*355 Merlin Estep argued the cause for appellant. On the briefs were Hewitt, Estep & Sorensen, of Salem.
Howard R. Lonergan, Assistant Attorney General, *356 of Portland, argued the cause for respondents. With him on the briefs were Robert Y. Thornton, Attorney General, and Lloyd G. Hammel, Assistant Attorney General, of Salem.
Before LATOURETTE, Chief Justice, and ROSSMAN, LUSK, BRAND, TOOZE and PERRY, Justices.
AFFIRMED.
LUSK, J.
This is an appeal by the plaintiff from a judgment of the Circuit Court dismissing a proceeding in habeas corpus and remanding the plaintiff to the custody of the warden of the Oregon state penitentiary.
The return to the writ averred that the plaintiff, Claude Castle, was and had been a prisoner in the penitentiary since July 24, 1941, by virtue of an arraignment and a judgment of the Circuit Court of the State of Oregon for the County of Polk dated July 24, 1941, a copy of which is attached to the return and which discloses that he was on that day sentenced to be imprisoned in the penitentiary for the term of his natural life under the Habitual Criminal Act upon a plea of guilty to an information charging that he had been theretofore convicted of four felonies.
Plaintiff filed a second amended traverse of the return in which he denied "that the authority for the custody and the direct cause of the imprisonment of Claude Castle" was the judgment and life sentence under the Habitual Criminal Act, except as thereafter admitted or alleged; and affirmatively alleged that his imprisonment was illegal for the following reason, among others:
"At the time of issuance of the life sentence * * * Plaintiff had * * * previously been *357 sentenced to serve a term of three years imprisonment upon the last conviction of which Plaintiff was accused in the Habitual Criminal proceeding; said prior sentence was legal and valid in all respects and it was not and never has been vacated; and Plaintiff has now served in full said three-year sentence."
The traverse sets up a copy of the habitual criminal information which shows the following convictions of the plaintiff for felony: March 24, 1930, conviction in the Supreme Court of New York of the crime of rape, second degree; December 16, 1936, conviction in the Circuit Court of the State of Oregon for Marion County of the crime of uttering a forged instrument; October 26, 1937, conviction in the Circuit Court of the State of Oregon for Coos County of the crime of uttering a forged instrument; July 24, 1941, conviction in the Circuit Court of the State of Oregon for Polk County of the crime of larceny of livestock.
The traverse further alleges that the conviction in Coos County dated October 26, 1937, being the third of the above enumerated convictions, was for a crime committed on November 28, 1936, which was prior to the date of the second conviction, December 16, 1936, and that hence the plaintiff has not been convicted of four felonies within the meaning of the Habitual Criminal Act; that at the time of plaintiff's conviction and sentence upon the fourth felony charge both the sentencing court and the district attorney knew of all the convictions alleged in the habitual criminal information; that after his imprisonment in the penitentiary the prison authorities prevented his communicating with his legal counsel and so prevented his appealing to the Supreme Court of Oregon.
A demurrer to the traverse was sustained by the *358 court and the questions on this appeal arise out of that ruling.

First: Failure to Vacate Previous Sentence.
The statute which governs this case is found in OCLA §§ 26-2801 to 26-2804. It was repealed by Oregon Laws 1947, ch 585, and a new statute enacted, which is now ORS 168.010 to 168.060. OCLA § 26-2803 prescribed a penalty of life imprisonment upon conviction of a fourth felony. The language of this section will be more particularly noticed when we come to consider another contention of the plaintiff. Section 26-2804 was a procedural section. It provided that when a defendant had been convicted of a felony and it was subsequently found that he had been previously convicted of felonies "the court shall sentence him to the punishment hereinabove provided [in this instance, life imprisonment], and shall vacate the previous sentence, deducting from the new sentence all time actually served on the sentence so vacated." (Italics added.) According to the allegations of the traverse the three-year sentence imposed for the fourth felony has never been vacated and the plaintiff has fully served that sentence. His claim is that the court's failure to vacate the previous sentence rendered the sentence of life imprisonment illegal and void, leaving the three-year sentence previously imposed as the only valid sentence, and, as that has been fully served, he is entitled to his discharge.
The contention has support in Broom v. Alexander, 198 Or 551, 255 P2d 1081. That was a habeas corpus proceeding in which the Circuit Court for Marion County had ordered the discharge of Broom, the plaintiff. Pending the appeal from that judgment and before the case was at issue here, the superintendent *359 of the penitentiary, defendant in the habeas corpus proceeding, filed a motion in this court for an order authorizing him to remove the prisoner to the sentencing court, the Circuit Court for Polk County, in order that the record might be corrected. It appeared that Broom had been convicted of statutory rape in Polk County and sentenced to ten-years imprisonment, that thereafter he had been sentenced by the same court to life imprisonment as an habitual criminal but that the previous sentence of ten-years imprisonment had never been vacated, and the correction of the record sought to be made was the vacation of that sentence in accordance with the requirement of OCLA § 26-2803. The motion was met by the contention of the prisoner that the court was without power to allow it because he was entitled to his freedom as a result of the judgment of discharge of the Circuit Court for Marion County. He urged that the appeal did not stay the execution of the judgment, and this was the question argued in the briefs supporting and opposing the allowance of the motion. Upon an examination of the record, however, the fact was disclosed that the prisoner had already served ten years in the penitentiary, and we denied the motion on the ground that the habitual criminal sentence was void because the sentence of ten years in the penitentiary had not been vacated, and that was the only valid sentence and it had been fully served. We further held that a sentence that had been fully served could not be vacated. In this view we concluded that the appeal had become moot and should be dismissed and that the prisoner was entitled to his discharge.
1. The Attorney General earnestly argues that the Broom case was wrongly decided and that we should *360 re-examine the grounds of our judgment and overrule it. The record in this case, however, discloses a fact which was not present in the Broom case and which is controlling, regardless of the criticism of that decision. The second amended traverse alleges:
"On July 24, 1941, at the time when Plaintiff was convicted of and sentenced for the last crime charged in the information a copy of which is referred to herein as `Exhibit A', both the District Attorney and the Court that imposed the three-year sentence for said last crime were fully advised and informed of all of the prior convictions set out in the information upon which the Habitual Criminal proceedings were based."
The foregoing allegations are admitted by the defendant's demurrer.
2. It is the plaintiff's contention that the court's knowledge of the prior convictions, when it imposed the three-year sentence for the principal offense of larceny of livestock upon the fourth conviction, deprived the court of jurisdiction to impose the sentence of life imprisonment prescribed by the Habitual Criminal Act. We think that the result is directly the opposite, that in those circumstances the court lost power to pass the original sentence and was charged with the mandatory duty to impose a sentence of life imprisonment.
3, 4. As this and other courts have frequently said, the Habitual Criminal Act creates no offense, but merely provides a proceeding to determine the penalty to be imposed on the main charge. Broom v. Alexander, supra, p. 559, and cases cited. The increased penalty, where the fact of previous conviction is established, is mandatory. Macomber v. State, 181 Or 208, 218, 180 P2d 793. As stated by the Court of Appeals of New York in Dodd v. Martin, 248 NY 394, 399, 162 *361 NE 293, "The Legislature has provided a mechanistic rule to take the place of the discretionary powers of the judge in passing sentence on second offenders". Under OCLA § 26-2804 an information accusing a person of previous convictions may be filed "at any time, either after sentence or conviction." It is the duty of the district attorney to file such an information when his attention is called to such previous convictions, and the duty of prison wardens, probation, parole, police or other officers who know that a person charged with or convicted of a felony has been previously convicted to report the facts to the district attorney of the county from which he was sentenced. Upon filing of the information "the court in which such conviction was had shall cause the said person, whether confined in prison or otherwise, to be brought before it" for a hearing, and, if he be found to be the person who had been previously convicted, as charged in the information, the court must impose sentence as provided in the Act and vacate the previous sentence, if one has already been passed, deducting from the new sentence time actually served on the vacated sentence.
5, 6. We took our Habitual Criminal Act from the Baumes Laws of New York, and the New York decisions are for that reason "peculiarly pertinent". Macomber v. State, supra, 181 Or 242.
The New York Court of Appeals, in two decisions which are reviewed at length in the Macomber case, has passed directly on the question before us. In Dodd v. Martin, supra, the court held that a sentence as a first offender of one known to the court to be a second offender was illegal. The court said:
"The Baumes Laws withdraw all discretion from the court in such cases. In this view of the law, the fact that the former conviction was known at *362 the time sentence was imposed is immaterial. Graham v. State of West Virginia, 224 U.S. 616, 32 S.Ct. 583, 56 L.Ed. 917. The sentence was illegal and proceedings for resentence the inevitable sequence."
There is a like holding in People v. Daiboch, 265 NY 125, 191 NE 859. The court of appeals there said:
"Before the first sentence was imposed the judge knew of the prior offense and had no right or power to impose an indeterminate sentence."
Although the question in the Macomber case related to the effect of the knowledge of the district attorney of the commission of prior offenses at the time of passing of sentence on the principal charge, yet we cited the New York cases with full approval, concluding our discussion of them with this statement:
"* * * Since the penalty is mandatory and imperative, it is difficult to understand how either the district attorney or the trial judge has authority to waive its imposition." (181 Or 237.)
The New York decisions are in entire accord with our holding in State v. Durham, 177 Or 574, 164 P2d 448, 162 ALR 422. The defendant there was convicted of a felony, and before sentence an information charging him as a fourth offender was filed. This charge having been established in a jury trial, the court then sentenced the defendant to life imprisonment. On appeal to this court the defendant assigned as error the refusal of the Circuit Court to sentence him on the principal charge before proceeding with the habitual criminal charge. Speaking through Mr. Chief Justice BELT, we said:
"* * * We do not agree with this contention. It would have been premature and in violation of the purpose and spirit of the Habitual Criminal *363 Act to have imposed sentence on the main charge before determining whether the defendant was a fourth offender as charged in the information. Indeed, the court had no authority to impose sentence on the main charge after this information had been filed and while it was pending. Had the court done so, such sentence could have been vacated in the event the defendant was found to have been an habitual criminal." (Italics added.)
Of course, the knowledge of the court must be such as it acquires as a court and in the course of judicial proceedings and upon the strength of which the court is warranted in acting or refraining from acting. In the Dodd case the court was advised of the previous offense by an allegation in the indictment, a practice permissible under New York law. In the Daiboch case the knowledge was acquired during proceedings in court at the time that the defendant was sentenced upon the original charge. The present case must be decided upon pleadings only. We have the allegation, admitted to be a fact, that "the court * * * was fully advised and informed" of the prior convictions, etc. It is not alleged in what particular manner the knowledge came to the court. As the entire proceeding  the conviction and sentence on the principal charge, the filing of the information, and the sentence as an habitual criminal  took place on the same day, it may very well have been acquired by the court during the proceedings upon the indictment charging the fourth felony. However that may be, in the absence of a motion to make more definite and certain the allegation is sufficient for the purpose for which it was manifestly intended, namely, to charge that the court, as a court, was informed and knew of the prior convictions at the time it passed the original sentence.
*364 7. This being the state of the case, we hold that the original sentence was illegal, that it became the mandatory duty of the court, after the fact of previous convictions had been admitted by plaintiff, to impose the sentence of life imprisonment, which was the only valid sentence, and that the plaintiff's confinement in the penitentiary is pursuant to that sentence, and not otherwise. The failure of the court, therefore, "to vacate the previous sentence" is a matter of no consequence in the circumstances of this case.

Second: The Question of Sequence of Offenses and Convictions.
8. We have stated that the third conviction of the plaintiff was for a crime committed before he was convicted the second time. The plaintiff contends that the statute, properly construed, means that a person may not be adjudged a fourth offender, and therefore liable to life imprisonment, unless the second conviction was of a crime committed after the first conviction, and the third conviction was of a crime committed after the second conviction and the fourth conviction of a crime committed after the third conviction. We do not agree with this contention because the statute says otherwise. We refer now to the pertinent sections of OCLA.
§ 26-2801. "A person who, after having been convicted within this state of a felony, or an attempt to commit a felony, or, under the laws of any other state, government or country, of a crime which, if committed within this state, would be a felony, commits any felony within this state, shall be punished, upon conviction of such second offense, as follows: If the subsequent felony is such that, upon a first conviction, the offender would be punishable by imprisonment for any term less than his natural life, then such person must be sentenced *365 to imprisonment for a term not less than the longest term, nor more than twice the longest term, prescribed upon a first conviction."
§ 26-2802. "A person who, after having been two times convicted within this state of felonies, or attempts to commit felonies, or, under the law of any other state, government or country, of crimes which, if committed within this state, would be felonious, commits a felony within this state, shall be punished, upon conviction of such third, or subsequent, offense, as follows: If the second felony is such that the offender would be punished by imprisonment for any term less than his natural life, then such person must be sentenced to imprisonment for a term not less than the longest term nor more than twice the longest term prescribed in section 26-2801."
§ 26-2803. "A person who, after having been three times convicted within this state of felonies or attempts to commit felonies, or, under the law of any other state, government or country, of crimes which, if committed within this state would be felonious, commits a felony within this state, shall be sentenced, upon conviction of such fourth, or subsequent, offense, to imprisonment in a state prison for the term of his natural life."
It is, of course, quite clear, under the language of § 26-2801, that the penalty for a second conviction may only be imposed for a felony committed after a first conviction. As to the construction of § 26-2802, concerning which there is dispute, we need express no opinion. Section 26-2803 is unambiguous. It simply says that a person who commits and is convicted of a felony after having been three times convicted of felonies shall be sentenced to life imprisonment. The only "sequence" requirement in the section is that there must have been three previous convictions of felonies without regard to any particular order of offense and conviction. To sustain the plaintiff's contention, *366 therefore, it would be necessary to read into the statute a provision to the effect that the previous felonies, in order to be counted, must each have been committed after a prior conviction. We do not feel warranted in taking such liberties with the language of the statute, notwithstanding the fact that some other courts seem to have done so in construing similar language. The theory upon which they have proceeded is thus stated in the annotation in 24 ALR2d 1247 at p. 1248:
"* * * But, regardless of the difference in phraseology, the preponderance of authority supports the view that the prior convictions, in order to be available for imposition of increased punishment of one as a habitual offender, must precede the commission of the principal offense, that is, the latest prosecution in point of time. In this connection, it has been brought out in numerous cases that, although differing somewhat in language, the same principle is inherent in a habitual criminal statute, namely, that the legislature in enacting such a statute intended it to serve as a warning to first offenders and to afford them an opportunity to reform, and that the reason for the infliction of severe punishment for a repetition of offenses is not so much that the defendant has sinned more than once as that he is deemed incorrigible when he persists in violations of the law after conviction of previous infractions."
Conceding that the foregoing is a correct statement of the theory behind habitual criminal legislation, it still remains true that it may very well have been the view of the legislature of this state that a person who has been three times convicted of felonies, regardless of the order of commission and conviction, and afterwards has "sinned again", is to be deemed incorrigible, and, for that reason and for the protection *367 of society, to have merited imprisonment for life. Certainly the legislature has expressed no different policy. Moreover, there has been a significant change in the law which reenforces this conclusion. The first habitual criminal act in this state was General Laws of Oregon 1921, ch 70. It read as follows:
"Every person convicted a third time of felony, the punishment of which is confinement in the penitentiary, shall be confined in the penitentiary during his life. Judgment in such cases shall not be given for the increased penalty, unless the jury shall find, from the record and other competent evidence, the fact of former convictions for felony committed by the prisoner, in or out of this state; provided, such former judgments shall be referred to in the indictments, stating the court, date and place of rendition; and provided, that the dates of the convictions relied upon to increase the penalty be prior to the commission of the subsequent offense." (Italics added.)
When the 1921 Act was repealed and the statute governing this case was adopted in 1927 (General Laws of Oregon, ch 334) the last proviso in the 1921 Act, which we have italicized, was omitted from the new law. Instead, the legislature, in enacting what became OCLA § 26-2803, adopted the exact language of § 1942 of the New York Penal Law. See McKinney's Consolidated Laws of New York, Book 39, Part 2, Penal Laws § 1942 (1944). In Terwilliger v. Turk, 156 Misc 246, 281 NYS 527, the Supreme Court of New York, having before it the precise question with which we are now dealing, construed the statute to mean that the order of commission and conviction of the first three offenses is immaterial on the question of whether the defendant is a fourth offender. The court said:
"* * * To make the defendant a second offender, under section 1941, the commission of his *368 second offense must follow his first conviction. The section says so. To make a defendant a fourth offender, under section 1942, the order of the commission and conviction of the first three offenses is immaterial. All that is necessary is that the three convictions precede the commission of the fourth offense. The section says so."
Other New York cases enunciating the same rule are People ex rel Terwilliger v. Brophy, 256 App Div 894, 9 NYS2d 25; People ex rel Bravata v. Morhous, 273 App Div 929, 77 NYS2d 451; People ex rel Reynolds v. Morhous, 268 App Div 843, 50 NYS2d 272; Terwilliger v. Eaton, 164 Misc 776, 299 NYS 351; People v. Gorney, 203 Misc 512, 103 NYS2d 75.
Counsel for plaintiff undertake to distinguish the New York cases on the ground that, as it is claimed, the New York statute, in contrast to the Oregon statute, "makes no distinction whatever  as to time sequence  between a second and a third conviction." But the New York decisions do not turn upon the question of sequence as between the earlier convictions. The construction in the Turk case was based upon the language of the fourth-offender statute, although the court did call attention to the distinction which emphasizes the legislative intent, namely, that, while to make a defendant a second offender the commission of the second offense must follow his first conviction, there is no similar requirement as to fourth offenders.
9, 10. This is equally true of our statute. We are of the opinion that we should follow the New York precedents. The same rule of construction under a similar statute appears to have been adopted in Pennsylvania. See Commonwealth ex rel. Dugan v. Ashe, 338 Pa 541, 13 A2d 523; Commonwealth ex rel. Turpack v. Ashe, 339 Pa 403, 15 A2d 539. See, also, State v. McCall, *369 27 NJ Super 157, 99 A2d 153. The decisions to the contrary, some based on statutes like ours and others on statutes containing different language, are collected in the annotation in 24 ALR2d 1247. Nothing is to be gained by reviewing them here. Our conclusion, after a careful consideration of the question, is that the plain language of our statute requires us to hold that in order for a person to be adjudged a fourth offender it is only necessary that it be shown that, before the commission and conviction of the principal offense, he had been three times convicted of felonies.

Third: Other Assignments of Error.
11, 12. It is contended that the third-offender provision of the statute, OCLA § 26-2802, is unconstitutional. It is unnecessary for us to pass upon this question for this case does not involve application of that section. We deal here only with a penalty for life imprisonment imposed on the plaintiff by authority of § 26-2803. As we have held, conviction of a fourth felony committed after three previous felony convictions is all that is needed to bring into play the mandatory provisions of § 26-2803. There is no requirement that the offender must have been previously convicted as a second offender and as a third offender. And, even though § 26-2802 were declared unconstitutional, the remainder of the statute would remain unaffected under "the fundamental principle that a statute may be constitutional in one part and unconstitutional in another part and that if the invalid part is severable from the rest, the portion which is constitutional may stand while that which is unconstitutional is stricken out and rejected." 11 Am Jur 834, Constitutional Laws, § 152. We are not to be understood as holding or intimating that § 26-2802 is unconstitutional, but merely that, if *370 it be so, the rest of the statute is severable from it and would stand, since the part claimed to be invalid cannot be regarded as an inducement to the valid portion. See Fullerton v. Lamm, 177 Or 655, 696, 697, 163 P2d 941, 165 P2d 63, and Oregon cases there cited.
13. The only other question that need be noticed arises upon the claim of the plaintiff that he was deprived of the right of appeal by the wrongful acts of the penitentiary officials who, it is charged, prevented him from communicating with his counsel. It is not contended that there were any errors in the proceedings other than the alleged errors set forth in the traverse and which we have discussed. Indeed, for all that appears, the conviction of the fourth offense may have been on a plea of guilty. In any event, we are not advised by the record of any irregularity or ruling prejudicial to the rights of the plaintiff which would have constituted ground for a reversal of the judgment. It is clear, therefore, that an appeal would have availed the plaintiff nothing, and, that being the case, the court would not be warranted either in ordering the discharge of the plaintiff or in granting him the right to a delayed appeal. See the discussion of this question in Huffman v. Alexander, 197 Or 283, 324-327, 251 P2d 87, 253 P2d 289.
For the foregoing reasons the judgment of the Circuit Court dismissing the proceedings and remanding the plaintiff is affirmed.
