
240 A.2d 595 (1968)
Louis M. GRIECO
v.
Harold V. LANGLOIS, Warden.
No. 180-M. P.
Supreme Court of Rhode Island.
April 9, 1968.
Gerald J. Pouliot, Gerald G. Norigian, Providence, for petitioner.
Herbert F. DeSimone, Atty. Gen., Richard J. Israel, Asst. Atty. Gen., for respondent.

OPINION
JOSLIN, Justice.
This habeas corpus proceeding was instituted by the petitioner who is now confined in the adult correctional institutions under a sentence imposed by a justice of the superior court. The petition, the respondent's return, and the petitioner's reply either expressly or by reference to pertinent records disclose the following.
The petitioner, upon his conviction for breaking and entering in the nighttime, was sentenced on March 9, 1956 to serve a term of eight years. At that time he was serving another sentence, and following its expiration on September 23, 1959, he was admitted to bail pending the determination by this court of his appeal from the conviction for which the eight-year sentence had been imposed.[1] On April 26, 1961, the appeal failed, *596 State v. Grieco, 92 R.I. 459, 169 A.2d 747, and thereafter on May 10, 1961, petitioner was committed by the superior court to commence serving the eight-year sentence. On June 9, 1964, after having served three years and 29 days,[2] he was released on parole under a permit which recited that his sentence which had commenced on May 10, 1961 would expire on September 22, 1966. He remained at liberty until May 26, 1967, when he was arrested and recommitted to the adult correctional institutions for an alleged violation of his parole permit. Both that arrest and commitment were under the authority of a detention warrant issued by the chairman of the parole board pursuant to G.L. 1956, § 13-8-18. The petitioner immediately challenged the validity of his detention under that warrant by a habeas proceeding in the superior court, and a justice of that court on June 6, 1967, finding that the parole permit had not validity issued, denied the petition and remanded the petitioner to the custody of the respondent warden. Thereafter, on June 27, 1967 the parole board withdrew[3] the detention warrant under which petitioner had been arrested and committed. This petition was then filed.[4]
What gives rise to petitioner's claim that his present confinement is illegal is that his arrest and commitment on May 26, 1967 for an alleged parole violation postdated by more than eight months the September 22, 1966 date which his parole permit recited as the time when his sentence would expire. Although the record before us does not disclose what manner of computation resulted in the selection of September 22, 1966 as the terminal date of his sentence, it is not unreasonable to assume that under the formula[5] adopted there was deducted from petitioner's sentence, as of its commencement, the maximum good conduct and industrial time credits to which one serving a full eight-year sentence could be entitled under the "good conduct" act then in effect.
The initial issue is whether the correct formula was used in computing the authorized credits. We assume, although we do not decide, that the controlling statute was that in effect on the day petitioner began serving his sentence (§ 13-2-44 as amended by P.L. 1960, chap. 112, sec. 1), rather than that operative on the day sentence was imposed (P.L. 1955, chap. 3549, sec. 1).[6] The 1960 act, and the enactment hereinafter referred *597 to, but only for illustration purposes, reads:
"The warden shall keep a record of the conduct of each prisoner, and for each month that a prisoner has been sentenced to imprisonment for six (6) months or more and not under sentence to imprisonment for life appears by such record to have faithfully observed all the rules and requirements of the institutions and not to have been subjected to discipline, there shall, with the consent of the assistant director of the department of social welfare in charge of correctional services, upon recommendation to him by the warden, be deducted from the term or terms of sentence of such prisoner the same number of days that there are years in the said term or terms of his sentence * * *."
While the statute clearly prescribes the number of days a prisoner can earn each month,[7] even a cursory reading discloses that it is indefinite and leaves open for construction how those credit days are to be computed. A possible construction, and the one apparently used in fixing the expiration date of petitioner's sentence, credits a prisoner in advance with the total number of days of good conduct and industrial time that he could possibly earn at the applicable rate spread over the entire length of his term. An alternate construction, and it is the one customarily given to comparable statutes, is that credits are extended monthly or yearly as the case may be, instead of in advance, and under this method a prisoner will not be entitled to his release until the point is reached when the actual days he has served plus the total credit days for the months he has actually served equal the number of days of his sentence. Von Hecht v. Eyman, 1 Ariz. App. 594, 405 P.2d 904; May v. Hoffman, 179 Kan. 149, 293 P.2d 265. However the statute is construed, there is, of course, the further question of whether credits, either for good conduct or for engaging in institutional industries, accrue while a prisoner is at liberty on parole as well as while confined within the prison walls.
While the correct manner of computing good conduct credits must some day be determined,[8] it need not be answered at this time inasmuch as what is here decisive is that stipulation in § 13-2-44, as amended by P.L. 1960, chap. 112, sec. 1, which provides that good conduct and industrial time credits shall be deducted only "* * * with the consent of the assistant director of the department of social welfare in charge of correctional services, upon recommendation to him by the warden * * *."[9]
Whether in this case such a recommendation was made or such a consent given are open questions. They were not answered in the superior court. And in this court, respondent, answering the petition, specifically denied that the recommendations or consent were either made or given, whereas petitioner in his reply, at least implicitly, controverted that denial.
The petitioner, however, discounts as being without significance the absence of *598 any resolution of the evidentiary questions. He argues that a prisoner who comports himself within the prescribed standards earns credits for good conduct and industrial time irrespective of any affirmative action by the designated officials, and that a commutation of a sentence for good conduct is a matter of right rather than of privilege or grace. Continuing from that premise, he argues further that parole is available only to a prisoner whose prison conduct had been good,[10] that he could not have been paroled had not his prison conduct been good, and that inasmuch as he qualified for parole he became entitled as of right to have the appropriate officials perform their ministerial duty of causing the term of his sentence to be reduced as prescribed by the good conduct statute.
There is much that can be said for petitioner's theory. Certainly, one of the purposes customarily associated with a good conduct statute is the encouragement it will give to a prisoner to observe prison rules. The source of that encouragement is the prospect that compliance with the established standards will enable him to be released from prison at a date earlier than that set by his original sentence. To a prisoner, that assurance is the reward which the prison administration holds out for compliance with its rules and regulations, and, as we said in Rondoni v. Sherman, 90 R.I. 322, 158 A.2d 267, is an incentive for his good behavior. To make his right to obtain that reward turn on the discretion of the warden and the assistant director, rather than solely on whether he has conducted himself conformably to prison rules and regulations, would defeat the purpose of the legislation, and in the instance of a prisoner who had not been guilty of any infraction of the rules, would engender such dissatisfaction and resentment as would adversely affect certainly his own morale and probably that of the inmates generally.
While the foregoing considerations might weigh heavily if the slate were clean, this court, in Lee v. Kindelan, 80 R.I. 212, 95 A.2d 51, passed on the question of whether credits are allowable as a matter of right, or are instead dependent upon some antecedent action by designated officials. In that case we held that when and under what conditions a prisoner should receive credits against his term were questions exclusively within the province of the legislature, and at 222, 95 A.2d at 55, we construed the statute as not authorizing "* * * an automatic reduction in the time to be served under a sentence * * *," and as expressly making "* * * the permitted reduction subject to certain conditions as therein expressed, namely, the necessity for a particular record of good behavior, the recommendation of the chief of the division of jails and reformatories and of the director of social welfare, and the consent of the governor."[11]
Since our decision in the Lee case, the good conduct statute there considered has several times been amended,[12] and in each instance the legislature reenacted the substance of the stipulation which we there construed. In these circumstances we deem the inclusion of a substantially identical provision in an amendatory enactment as evidencing a legislative intention to adopt *599 in the later version the construction which the court previously placed upon the language of the earlier. In re O'Connor, 21 R.I. 465, 44 A. 591; Kent v. Atlantic DeLaine Co., 8 R.I. 305.
We follow therefore the construction given in Lee v. Kindelan, supra, to the good conduct statute, and we hold that the absence of the prerequisite recommendation by one state official and the prescribed consent of another made it impossible for good time credits to be extended to petitioner and for the term of his sentence to be thereby reduced. The parole board, therefore, had no warrant to inscribe the expiration date of September 22, 1966 on petitioner's parole permit.
That the parole board lacked authority to reduce petitioner's sentence by deducting good conduct and industrial time credits, or that in purporting to exercise such an authority it may have erroneously fixed September 22, 1966 as the expiration date of petitioner's sentence, do not, however, without more, provide sufficient reason to declare his parole permit void or to deny him the right to be at liberty on parole. His parole permit did not issue until after he had served more than one-third of his time. It was valid on its face. The respondent does not suggest that it issued improperly. He argues only that the erroneous calculation of the expiration date rendered the permit illegal and void. We agree that the board could neither shorten petitioner's term nor extend good conduct credits to which he was not by law entitled. It was error to attempt to do so. The deficiency, however, goes to form, rather than to substance. As such it is harmless, and we consider the recital of a fixed termination date as immaterial surplusage. We read the permit as if the date of September 22, 1966 did not appear. So read, it authorizes petitioner "* * * to be at liberty under the terms and conditions enumerated below during the unexpired term of his sentence, unless this permit shall be sooner revoked or become void."
Under such a permit petitioner, who on this record had not earned good conduct or industrial time credits, was still serving his original eight-year sentence, although at liberty on parole, when on May 26, 1967 he was arrested and committed under a detention warrant issued by the chairman of the parole board.
Ordinarily, that commitment would have been followed by a parole board determination as to whether or not petitioner's parole permit should be revoked. Section 13-8-18 so requires and also stipulates that a parolee who is apprehended on a detention warrant shall be set at liberty under the terms and conditions of his original permit if it is determined that his permit should not be revoked. If, however, it is decided to revoke the permit, then the parolee must serve the remainder of his original sentence, and he will not be entitled to any credit against that sentence for the period during which he was at liberty on parole. G.L. 1956, § 13-8-19; Lee v. Kindelan, supra.
The sequence of events here, however, departed from the customary. Following his commitment under the detention warrant, petitioner challenged the legality of his confinement by habeas proceedings commenced in the superior court. In that court, as in this court, petitioner's theory was that his parole permit had expired prior to the issue of the detention warrant and that therefore his subsequent arrest and commitment were illegal. Without ever reaching "* * * the question of the validity or invalidity of the detention warrant," the superior court found that the insertion of an erroneous termination date was fatal to petitioner's claim. It held, therefore, that he had been at liberty under "* * * a defective parole permit * * *" and that he had "* * * legally, never been out of the Adult Correctional Institution." Such a conclusion, in the light of what we have said here, was erroneous; and it follows that petitioner's detention pursuant to the trial justice's decision *600 that he continue to serve his original eight-year sentence  as if he had never been paroled  is illegal.
Following the hearing in the superior court petitioner, even though thereafter illegally restrained under the order of the superior court, was nonetheless legally detained under the detention warrant issued by the chairman of the parole board. The parole board, however, did not act on that warrant, but elected instead to rely on the decision of the superior court holding the parole permit invalid and on June 27, 1967 voted to withdraw its detention warrant. Upon its withdrawal, respondent lost whatever legal justification he then had for further detaining petitioner; and petitioner became entitled to be at liberty under the terms and conditions of his parole permit. That we find him so entitled in no way implies that the parole board may not now in accordance with law revoke that permit.
The petition for habeas corpus is granted, and the respondent is directed to discharge the petitioner forthwith from the custody in which he is held pursuant to his commitment under the mittimus of May 10, 1961, as construed in the June 6, 1967 decision of the superior court.
NOTES
[1]  While at large on bail he was extradited to New York where he was tried and acquitted of the offense for which he had been extradited. He then returned voluntarily to this state. His absence in New York accounts, at least in part, for the delay in the disposition of his appeal. See Grieco v. Langlois, 94 R.I. 415. 181 A.2d 230, 182 A.2d 434.
[2]  G.L. 1956, § 13-8-9, authorizes the parole board to permit a prisoner under its control, except if serving a life term or confined as an habitual criminal, to be at liberty upon parole for the remainder of his term of sentence whenever he shall have served at least one third of that term.
[3]  The parole board's record shows the following entry. "Voted  to withdraw Detention Warrant: Louis M. Grieco  to withdraw Detention Warrant issued May 23, 1967 in compliance with rescript of Mrs. Justice Murray [trial court justice] filed after hearing of inmate's petition of habeas corpus."
[4]  The case comes to us on an original petition and not by way of an appeal from the judgment of the superior court. General Laws 1956, § 10-9-3, gives original jurisdiction in habeas proceedings both to this court and to the superior court, and although § 10-9-22 bars an appeal from a superior court judgment in habeas corpus, it does not prohibit an application to this court based upon the same facts as may have been unsuccessfully relied upon in the superior court.
[5]  Under that formula the terminal date was arrived at in the following manner: The number of months of petitioner's eight-year sentence, 96, was multiplied by 10, the maximum statutory number of days good conduct plus industrial time credits per month, to which a person sentenced to an eight-year term could be entitled under § 13-2-44, as amended by P.L. 1960, chap. 112, sec. 1. The 960 credit days thus ascertained were then deducted from 2,920, the total days in the eight-year sentence, leaving 1,960 days or approximately five years and 135 days to be actually served. The appropriate adjustment resulted in an expiration date of September 22, 1966.
[6]  The two enactments insofar as here pertinent are substantially identical except for the number of credit days which could have been deducted from petitioner's sentence by reason of his good conduct. Under the 1960 act it could have been eight days per month, whereas under the 1955 act it could have been only five days. The industrial time credit of two days per month is the same under both acts.
[7]  Thus a person serving four years is entitled to a good conduct credit of four days per month, and one eight years, to eight days per month. The maximum permissible deduction for good conduct, however, is 10 days per month.
[8]  When the question is squarely before us, our determination will be aided by a record which includes a detailed description of how presently as well as in the past good conduct and industrial time credits have as a matter of prison administration been extended.
[9]  Under the act in effect when sentence was imposed in 1956, the prerequisite consent was from the governor upon the recommendation to him of the chief of the division of jails and reformatories.
[10]  Section 13-8-14 provides in pertinent part that no permit shall be issued unless it shall appear to the parole board that the prisoner is deserving thereof "* * * by reason of his good conduct while imprisoned."
[11]  In Lee v. Kindelan, supra, the controlling statute was G.L. 1938, chap. 55, sec. 18, as amended by P.L. 1951. chap. 2746. It differs in detail, rather than in substance, from § 13-2-44 as it read either in 1955 or in 1960. Insofar as here pertinent the differences relate not to whether there must be an antecedent recommendation and consent, but as to which government official makes the required recommendation and which gives the prerequisite consent.
[12]  P.L. 1955, chap. 3549, sec. 1; P.L. 1956, chap. 3721, sec. 1; P.L. 1960, chap. 112, sec. 1.
