
531 P.2d 901 (1975)
STATE of Oregon, Respondent,
v.
Charles Carl LEATHERS, Petitioner.
Supreme Court of Oregon.
Argued and Submitted January 6, 1975.
Decided February 13, 1975.
*902 Richard S. Mannis, Portland, argued the cause and filed the briefs for petitioner.
John W. Burgess, Asst. Atty. Gen., Salem, argued the cause for respondent. With him on the brief were Lee Johnson, Atty. Gen., and W. Michael Gillette, Sol. Gen., Salem.
Before O'CONNELL, C.J., and McALLISTER, DENECKE, HOLMAN, TONGUE and BRYSON, JJ.
HOLMAN, Justice.
Defendant was convicted in Harney County of the crime of assault, a misdemeanor. He was sentenced to 60 days in the Multnomah County jail, to be served on weekends, and a $1,000 fine was imposed plus costs. The trial court sentenced him to serve his incarceration in Multnomah County because defendant was a resident of that county and operated a business there. The court was concerned that defendant's business would suffer unduly if defendant was incarcerated 60 consecutive days and, even if the sentence was served on weekends in Harney County, it would still suffer because defendant would use Mondays and Fridays traveling the 300 miles between Harney and Multnomah counties.
Following the commencement of the sentence, the district attorney filed a motion to set it aside, contending the trial court was without authority to order defendant's confinement in any county other than Harney. The court reconsidered its sentence and decided it had exceeded its authority and ordered defendant to serve the balance of his sentence in Harney County. Defendant appealed from the order changing the place of confinement. The Court of Appeals affirmed the corrected sentence, 99 Adv.Sh. 954, 525 P.2d 63 (1974), and this court granted review.
ORS 137.140 specifies the circumstances in which a defendant can be sentenced to confinement in a county other than that of his conviction. It was amended by the 1973 legislative session, Oregon Laws 1973, ch. 836, § 263, as part of the new Oregon Criminal Procedure Code which went into effect January 1, 1974. Defendant's initial sentence was imposed October 31, 1973, and the subsequent corrected sentence was imposed in November 1973. The Court of Appeals mistakenly applied the amended statute which did not go into effect until January 1, 1974, Oregon Laws 1973, ch. 836, § 359, in deciding whether the trial court exceeded its authority. In so doing, it also misconstrued the amended statute and, having made two errors, it nonetheless came out with the right answer. At the time of sentence the statute read:
"Whenever it appears to the court, at the time of giving judgment of imprisonment in the county jail, that there is no sufficient jail in the proper county, as provided in ORS 137.330, suitable for the safe confinement of the defendant, the court may order the judgment to be executed in the jail of any county in the state."
Under this version of ORS 137.140 the only consideration in a determination of the sufficiency and suitability of a particular county jail is whether it is safe for the confinement of the defendant. In other words, ORS 137.140 permitted the court, in *903 its determination of whether the jail was "sufficient," to consider, at most, the defendant's safety as a prisoner and the safety of the jail itself as a confinement facility. The statute thus required defendant to serve his sentence in Harney County barring any finding by the trial court that the Harney County jail was unsuitable for his safe confinement. The record shows that the trial court was concerned only with defendant's continued operation of his business during his incarceration and was not sentencing defendant to confinement in Multnomah County because of the safety of its jail in any respect.
When, for impermissible reasons, the trial court sentenced defendant to serve weekends in a jail facility other than that existing in the county of judgment, the court, in effect, imposed a sentence in excess of that provided by statute. When a court acts beyond the bounds of its sentencing authority, it infringes upon the power of the legislature to determine the manner of punishment. A sentence must be in conformity with the governing statute; any non-conforming sentence is void for lack of authority and thus totally without legal effect. State v. Cotton, 240 Or. 252, 254, 400 P.2d 1022 (1965); State v. Commedore, 239 Or. 82, 85, 396 P.2d 216 (1964); Rightnour v. Gladden, 219 Or. 342, 347 P.2d 103 (1959). When the trial court discovered its error, it had the duty to take corrective action and to impose a valid sentence. State v. Cotton, supra, 240 Or. at 254, 400 P.2d 1022. This it did, and its judgment must be affirmed.
Defendant contends that since he had begun serving his sentence in the Multnomah County jail, any subsequent change in sentence which in any manner changed the effective penalty violated Oregon law, citing State v. Nelson, 246 Or. 321, 324, 424 P.2d 223, cert. denied, 389 U.S. 964, 88 S.Ct. 340, 19 L.Ed.2d 379 (1967). Although this may be true as to valid sentences, Scharbrough v. Cupp, 7 Or. App. 596, 599, 490 P.2d 529 (1971), rev. denied 1972, cert. denied, 409 U.S. 951, 93 S.Ct. 295, 34 L.Ed.2d 221 (1972), it is not true where the initial sentence is void for lack of sentencing authority. In State v. Nelson, supra, 246 Or. at 324, 424 P.2d at 225, this court stated:
"Subject to exceptions not here pertinent, it is the rule in this state that the trial court may not revise its judgment and increase the sentence even during the term at which it was pronounced if `the judgment has gone into effect by commitment of the defendant under it, * * *.' State v. Ludwig, 218 Or. 483, 492, 344 P.2d 764, 768; State v. Cannon, 11 Or. 312, 314, 2 P. 191.
"It is clear in this case that the execution of the judgment had not commenced at the time the trial court revised its judgment.
"Also, it is a general rule that if the judgment of the trial court is illegal and void, the trial court has not exhausted its jurisdiction since it has in fact failed to pronounce any sentence. When this occurs, the trial court may `then substitute a valid sentence for the one that is void.' Gladden v. Kelly, 213 Or. 197, 200, 324 P.2d 486, 488; Little v. Gladden, 202 Or. 16, 273 P.2d 443." (Emphasis ours.)
Ordinarily, this authority would dispose of the case; however, because the Court of Appeals misconstrued the amended statute, which we find not to be applicable, we must go further and point out its error so its construction will not be relied upon. The amended statute reads as follows:
"Whenever it appears to the court that there is no sufficient jail in the proper county, as provided in ORS 137.330, suitable for the confinement of the defendant, the court may order the confinement of the defendant in the jail of any county in the state."
It should be noted that the word "safe" was deleted. The Court of Appeals, in construing the statute as amended, said:
"* * * [I]n order to justify defendant's confinement in the Multnomah County jail under ORS 137.140, the trial *904 court must find that the Harney County jail is not `sufficient' for the `suitable' confinement of defendant. It is apparent from the record that the decision to allow defendant to serve his period of confinement in Multnomah County, rather than in Harney County, was made primarily as a matter of consideration and convenience to defendant. Defendant operates a business and lives in Multnomah County.
"Without elaborating on various theories concerning imprisonment of convicted criminal defendants, we note that confinement in a county jail as a result of a misdemeanor conviction is not a matter of convenience to the defendant. There is no evidence that the Harney County jail is not a suitable jail for the confinement of prisoners. The only matter presented is that the Harney County jail is not convenient for defendant.
"Convenience to the defendant is not a sufficient basis for the trial court to provide that defendant serve his county jail sentence in Multnomah County. * * *." 99 Adv.Sh. 954 at 956-57, 525 P.2d 63 at 64.
The primary purpose of statutory construction is to ascertain the legislative intent. In this endeavor, we may give due consideration to legislative history. During the October 2, 1972, meeting of the Criminal Law Revision Commission, wherein the final version of ORS 137.140 was drafted, Representative Paulus noted that a court may want a prisoner to serve his sentence in a place other than the county of conviction for reasons other than the sufficiency of the jail, and she suggested the statute be broadened to permit the court to take such other reasons into consideration. It was suggested that the limiting word "safe" be deleted from the statute to accomplish this purpose.[1] The amendment carried and the full legislature subsequently adopted this revision.
Although the statutory amendment could have been drawn more effectively, legislative intent is clear that considerations other than the physical condition of the jail are permitted.[2]
In addition, in view of the legislature's policy of encouraging rehabilitative employment outside of jail for a misdemeanant, we believe it was the intent of the codifiers that the amendment permit the effectuation of this policy.[3] The trial judge was being given additional authority to fit the sentence to the circumstances.
We conclude that, on the basis of the legislative history, the Court of Appeals construed the present version of ORS 137.140 too narrowly, thus giving a trial court very little, if any, discretion in this area. Trial courts are now permitted to give due consideration to a broader variety of issues *905 than before in determining whether a convicted misdemeanant shall be required to serve his sentence in the county wherein he was adjudged and sentenced.
The judgment is affirmed.
NOTES
[1]  Minutes, Criminal Law Revision Commission at 18-19 (October 2, 1972) (hearings on revision to ORS 137.140).
[2]  The word "safe" mistakenly appears in the title of the amended statute as it appears in the 1973 version of ORS. However, Oregon Laws 1973 show that it was deleted from both the body and the title of the statute as enacted by the legislature. This mistake in the codification of the title may have led the Court of Appeals astray in its interpretation of the amended statute.
[3]  "ORS 169.610 Policy. It is the policy of the Legislative Assembly to encourage better rehabilitative care to misdemeanants by encouraging the establishment of regional correctional facilities that can effectively provide a program that not only includes better custodial facilities than can be provided by cities or counties individually, but also that can provide work release, educational and other types of leave, and parole supervision by the Corrections Division."

"ORS 137.520 Power of committing magistrate to parole and arrange for employment of persons confined in county jail. (1) * * *.
"(2) If such a prisoner prior to sentence for any crime or offense has been regularly employed, the court, at the time of sentencing, may, by order, direct the sheriff of the county to arrange for such prisoner to continue his employment in the county or contiguous to the county where imprisoned, so far as possible. * * *.
"* * *."
