
239 N.W.2d 109 (1976)
Warner S. KELLY, Appellant,
v.
Lou V. BREWER, Appellee.
No. 2-57803.
Supreme Court of Iowa.
February 18, 1976.
Rehearing Denied April 12, 1976.
*111 John M. Thompson of Wm. F. Olinger Law Offices, Cedar Rapids, for appellant.
Richard C. Turner, Atty. Gen., Lorna Lawhead Williams, Special Asst. Atty. Gen., and Michael P. Murphy, Asst. Atty. Gen., Des Moines, for appellee.
Heard by MOORE, C. J., and REES, UHLENHOPP, REYNOLDSON and McCORMICK, JJ.
REES, Justice.
This is an appeal in an action brought by petitioner Warner S. Kelly under the provisions of chapter 663, The Code, 1973, in which he sought relief from his confinement in administrative segregation at the state penitentiary at Fort Madison. After hearing in trial court, the writ of habeas corpus which had previously issued was annulled. Petitioner appeals. We affirm.
The circumstances of petitioner's imprisonment in the penitentiary at Fort Madison have come to the attention of the federal courts as well as the courts of this state. Due to a substantial possibility that action by the United States Court of Appeals for the Eighth Circuit might have rendered moot and academic any opinion by this court on Kelly's appeal in this case, we deferred the filing of an opinion until action by the Circuit Court. That court has now taken such action and filed opinion on November 26, 1975. (See Warner S. Kelly and Samuel S. Parras, appellees v. Lou V. Brewer, Warden, appellant, No. 75-1523, and Warner S. Kelly and Samuel S. Parras, cross-appellants v. Lou V. Brewer, Warden, cross-appellee, No. 75-1562.) We therefore believe our disposition of the appeal pending in this court is now appropriate.
Petitioner was charged with, and convicted of, second degree murder for the stabbing of a prison guard at the penitentiary on June 8, 1972. Prior to that time he had been serving sentences totalling 13 years for the crimes of kidnapping, malicious injury to a building, lascivious acts with a child, and escape. Defendant took a direct appeal to this court following his conviction for murder, and we affirmed. See State v. Kelly, 224 N.W.2d 456 (Iowa 1974).
Before and after trial on the murder charge, petitioner was confined in the penitentiary under conditions described by prison personnel as "administrative segregation." Petitioner spent four days in Building 97 in the institution, which he described as "the hole," during which time he was kept in a completely darkened cell on the dark side of the building with steel flaps covering the window openings. During that time he was given no clothing, bedding, eating utensils or toilet tissue. After that four-day period and a subsequent transfer for a short time to the Iowa Security Medical Facility at Oakdale, petitioner was moved to Building 20, a maximum security lock-up facility, where his administrative segregation was accomplished. His cell there was located on the top tier of stacked cells, and was the last such cell on the east side next to the shower. The nearest inmate, and the only other one on the same tier, was 48 feet away from him with several double cells intervening, and it appears petitioner could communicate with *112 the other inmate on that tier only by shouting.
The conditions of petitioner's confinement in Building 20 in what was termed "administrative segregation" were more humane than the conditions imposed upon him in his four-day stay in Building 97. His cell in Building 20 measured 12 feet by 8 feet; the walls separating the cells were solid with a front constructed of bars. The cell was furnished with a small metal sink, a metal shelf, a table stool, bed and toilet. Petitioner was allowed some personal belongings, such as a television set, a radio, writing materials and toilet articles. He was afforded library privileges, smoking privileges and canteen privileges.
Interaction with other inmates, however, was extremely restricted. Petitioner was allowed out of his cell only to see visitors, to exercise for about 30 minutes a week during warm weather and to take two showers per week. Anytime he left his cell, he was handcuffed and escorted by three correctional officers. He was permitted to see a spiritual counselor from the Church of the New Song in his cell for about 15 minutes per week, but was not permitted to participate in the prison's work program.
In early 1974 defendant filed a petition for a writ of habeas corpus in the federal district court challenging the circumstances of his confinement, and alleging that his indefinite administrative segregation deprived him of due process under the Fourteenth Amendment to the Constitution of the United States and violated the proscription of the Eighth Amendment against cruel and unusual punishment. While the federal district court rejected the claim of cruel and unusual punishment insofar as it related to the conditions of petitioner's imprisonment subsequent to the four-day stay in Building 97, that court did perceive merit in petitioner's allegations of deprivation of due process, and accordingly ordered that the prison administration develop meaningful standards for periodic review to determine whether Kelly should be returned to the prison's general population. Kelly v. Brewer, 378 F.Supp. 447, 455-456 (S.D.Iowa 1974).
On June 17, 1975, the federal district court ordered prison authorities to release Kelly into the general prison population because of the State's failure to implement a plan designed to correct the constitutional deficiencies of the earlier procedure. On the following day Kelly was released to the general prison population.
As above noted, the United States Court of Appeals for the Eighth Circuit considered the appeal and the cross-appeal and filed opinion on November 26, 1975. The plan ordered by the federal district court for review of petitioner's status was set aside as too rigorous and as substantially exceeding the constitutional necessities of the case. Nonetheless, guidelines for satisfying due process were imposed upon the warden of the penitentiary for review of the petitioner's situation, with review of the warden's determination in federal district court. We must assume petitioner's present confinement, whether it be in administrative segregation or with the general population of the institution, is the result of constitutionally permissible considerations and procedures consistent with due process of law. We must also assume the warden of the institution has acted, and will act, scrupulously in conformity with the direction of the Court of Appeals for the Eighth Circuit.
Accordingly, we turn to a consideration of Kelly's action in our state court, which is on appeal to us here, and which turns upon issues of statutory interpretation rather than considerations of constitutional deficiencies.
Petitioner instituted the instant action on September 26, 1974, by filing a petition in the District Court of Lee County alleging he was unlawfully detained in the penitentiary in "solid lock-up status." At a hearing on October 9, 1974, petitioner and the respondent warden testified to conditions of petitioner's imprisonment and the reasons *113 for his detention in administrative segregation. The heart of petitioner's claim was that he had been confined in "solitary imprisonment" contrary to § 246.31, The Code, 1973.
After hearing, the District Court of Lee County held, inter alia, that petitioner had not been, and was not being, subjected to "solitary confinement" within the meaning of the above statute, and that he had failed to establish grounds for release from administrative segregation. This appeal was taken from that finding and concomitant conclusion of law.
The one issue stated for review by petitioner, although argued in four parts, is that trial court erred in holding petitioner was not subjected to "solitary imprisonment" within the meaning of § 246.31, The Code.
After due consideration, we conclude this case must properly be resolved upon a different ground, i. e., construction of the word, "discipline" in the above cited statute. "It is our duty to affirm if any proper basis appears for the ruling of the trial court even though it is not the one on which it was put or on which the court acted. [citations] Many a learned court is occasionally right for the wrong reason * *. A court decision which is proper on any ground shown by the record will not be disturbed merely because the decision is based on an unsound or erroneous reason." General Motors Acceptance Corporation v. Keil, 176 N.W.2d 837, 841-842 (Iowa 1970).
Therefore, the issue might be stated: Does § 246.31, The Code, render unlawful defendant's imprisonment in administrative segregation?
I. We have reached the conclusion the proper resolution of this appeal turns not upon the judicial construction of the words "solitary imprisonment" in § 246.31, The Code, but rather upon an interpretation of the word "discipline" in the same statute. Said statute provides:

"Hard labor and solitary imprisonment. All commitments to either of said institutions must be at hard labor. Solitary imprisonment of prisoners shall not be employed except for the purpose of discipline."
A good portion of petitioner's brief on appeal is devoted to the argument that any confinement which prevents a prisoner from serving his sentence at hard labor is "solitary imprisonment." As mentioned above, trial court concluded petitioner's status in administrative segregation did not constitute "solitary imprisonment."
The respondent warden in his brief supports trial court's line of reasoning, but urges more pointedly that petitioner is in error in attaching too narrow a meaning to the term "discipline" as used in § 246.31. Petitioner's original brief assumes that "discipline" refers only to sanctions imposed for infractions of specific prison rules, and if this assumption is correct it would appear solitary imprisonment can be imposed only as punishment for such infractions.
We believe there is sufficient evidence in the record to support the holding that Kelly's confinement was for purposes of "discipline" within the meaning of § 246.31, and accordingly conclude trial court's ruling should be affirmed without resort to its holding that petitioner was not confined in solitary imprisonment. While it might be questionable whether trial court was correct in its conclusion regarding solitary imprisonment, we shall not disturb the decision if other sufficient grounds for affirmance appear in the record. G.M.A.C. v. Keil, supra.
This appeal requires us to judicially interpret Code § 246.31. Petitioner places a restricted interpretation on the word "discipline" that is unwarranted in light of familiar principles of statutory interpretation.
It is our responsibility to ascertain and give effect to legislative intent. State v. Prybil, 211 N.W.2d 308, 311 (Iowa 1973). We must look to what the legislature said, rather than what it should or might have *114 said. Rule 344(f)(13), Rules of Civil Procedure; Davenport Water Company v. Iowa State Commerce Comm., 190 N.W.2d 583, 595 (Iowa 1971). Words are given their ordinary meaning unless defined differently by the legislature or possessed of a peculiar and appropriate meaning in law. State v. Prybil, supra; Sioux Associates, Inc. v. Iowa Liquor Control Comm., 257 Iowa 308, 311, 132 N.W.2d 421, 424; see § 4.1(2), The Code, 1975. Effect is to be given to the entire statute. No court, under the guise of judicial construction, may add words of qualification to the statute in question or change its terms. State v. Prybil, supra; Northern Natural Gas Company v. Forst, 205 N.W.2d 692, 696 (Iowa 1973); Maguire v. Fulton, 179 N.W.2d 508, 510 (Iowa 1970).
Two more specialized rules of statutory interpretation are particularly helpful in the matter before us. Changes made by revision of a statute will not be construed as altering the law, unless the legislature's intent to accomplish a change in its meaning and effect is clear and unmistakable. General Mortgage Corporation of Iowa v. Campbell, 258 Iowa 143, 150, 138 N.W.2d 416, 419-420; Spencer Publishing Company v. City of Spencer, 250 Iowa 47, 54, 92 N.W.2d 633, 637; Dennis v. Independent School District of Walker, 166 Iowa 744, 750, 148 N.W. 1007, 1009. If the revised statute is ambiguous or susceptible of two constructions, reference may be had to prior statutes for the purpose of ascertaining intent. General Mortgage Corporation of Iowa v. Campbell; Spencer Publishing Company v. City of Spencer; Dennis v. Independent School District of Walker, all supra.
The history of the section with which we are concerned is enlightening. Section 3118, which first appeared in the 1851 Code of Iowa, provided:
"All punishment in the penitentiary by imprisonment must be by confinement to hard labor, and not by solitary imprisonment; but solitary imprisonment may be used as a prison discipline for the government and good order of the convicts as hereinafter mentioned."
The identical provision appeared as § 5137 of the 1860 Code, § 4770 of the 1873 Code, and § 5675 of the 1897 Code.
The first material variation in the language of the statute occurred in the 1924 Code, where it appeared in what is now its present form, as set out supra.
It is readily apparent that the change made in the first sentence reflected the change in status of the penitentiary at Anamosa to its present designation as the Men's Reformatory, and the application of the statute to both institutions.
We are concerned here, however, with the nature of the language change authorizing solitary imprisonment "for the purpose of discipline" rather than "as a prison discipline for the government and good order of the convicts as hereinafter mentioned."
A careful consideration of the problem leads us to the conclusion that it is neither clear nor unmistakable that the legislature, in modifying the language of the statute, intended to effect a change in the meaning thereof. In fact, we believe there is much more support for the conclusion that the change merely reflects an economy of style.
Petitioner concedes in his brief that the change in language of the statute was probably not meant to alter the meaning thereof. Other factors convince us of the correctness of this view.
In 1924, the Fortieth Extra General Assembly accomplished a complete revision of the Code of Iowa. The great bulk of the legislation passed by that body, including the instant statute, was not printed in so-called "session laws," but was incorporated directly into the revised Code of Iowa, 1924. We believe the fact of the complete revision lends less support to the proposition that a change of meaning was intended by the change of language than it does to the proposition that the change reflected only economy of words or style.
*115 Furthermore, we have examined the Journal of the House of the 40th G.A. (Extra Session), and it contains no discussion or debate on the instant section on the floor of the legislature. Although discussions on numerous sections are recorded, it appears the section which we now consider was passed without comment. Judicial notice may be taken of proceedings as recorded in legislative journals to the same extent that such notice might be taken of the statutes of such legislative body. Socony Vacuum Oil Company v. State, 170 N.W.2d 378, 382 (Iowa 1969).
There being no evidence of legislative intent to alter the meaning of what is now Code section 246.31 by the language changes which occurred in effecting the revision of the Code in 1924, we may examine the prior statute to ascertain the meaning of "discipline." It is clear from express language of § 3118 of the Code, 1851, and successive codifications of the law that the term "discipline" as used therein encompassed "the government and good order of the convicts." We must interpret the term "discipline" in § 246.31 as encompassing the same concept.
Other considerations, although not conclusive if viewed singly, support this interpretation. First, we note that if the legislature had wished to limit "discipline" to the narrow meaning urged by petitioner, i. e., punishment for the infraction of specific prison rules, it could have incorporated such limitation into a statutory definition or preamble to the statute. See, e. g., 38 Ill.Code Anno. § 1003-1-2(h) (1973): "`Discipline' means the rules and regulations for the maintenance of order and the protection of persons and property within the institutions and facilities of the Department and their enforcement." This court may not add its own unwarranted words of qualification to the statute. See Northern Natural Gas Co. v. Forst, supra, 205 N.W.2d at 696.
In addition we must take a long look at the statute against a backdrop of traditional grants of discretion to prison officials with respect to the safe-keeping, security and discipline of prisoners. 72 C.J.S. Prisons § 18, p. 872; Cf. Breeden v. Jackson, 457 F.2d 578 (4 Cir. 1972). We will not attribute to the legislature an intention to so narrowly limit such discretion, absent a clearer showing in this regard by petitioner.
Furthermore, courts have not hesitated to speak of "discipline" in the broader institutional sense. See, e. g., Kelly v. Brewer, supra, 378 F.Supp. 447, 454 ("The prison's only legitimate object of summary placement of a prisoner in administrative segregation under facts similar to those in this case is to maintain order, discipline and security in the institution"); O'Brien v. Moriarty, 489 F.2d 941, 944 (1 Cir. 1974) ("It may be a necessary tool of prison discipline, both to punish infractions and to control and perhaps protect inmates whose presence within the general population would create unmanageable risks"). Stone v. Egeler, 506 F.2d 287 (6 Cir. 1974) (Transfer of prisoners suspected of being involved in drug traffic to maximum security prison was "disciplinary" in nature.)
Finally, though a court should not entirely resolve a question of intent from an isolated word taken out of context, definitions of such word may be of at least limited significance as one factor for consideration. See Dingman v. City of Council Bluffs, 249 Iowa 1121, 1130, 90 N.W.2d 742, 749. Accordingly, we note that Webster's Third New International Dictionary (unabridged) lists as one definition for the word "discipline": "control gained by enforcing obedience or order (as in school or army); strict government to the end of effective action * * *." This definition is particularly well-suited to an institutional context, such as that which we are here considering.
The record below manifestly supports the conclusion that Kelly's confinement in administrative segregation was for *116 the purpose of "discipline" as we believe the word must be interpreted. Respondent warden testified to the purpose of Kelly's confinement prior to his trial for the prison murder as follows:
"In my view, Mr. Kelly at that time posed a danger in terms of the personal safety of staff and inmates and further, in my view, there was a potential danger to him."
Respondent Brewer testified Kelly's post-trial segregation was for "[t]he security and good order of the institution and the dangers * * *," and "[t]he protection of Mr. Kelly and the protection of the staff and inmates of the institution."
II. Petitioner argues in his reply brief that § 246.8, The Code, when read in conjunction with § 246.31, negates the view that the term "discipline" in the latter section encompasses any more than the concept of punishment for the infraction of specific prison rules. It is true that § 246.8 refers to "disciplinary" rules. The section does not, however, undertake to comprehensively define "discipline." Rather, it simply mandates that prison officials use officially designated modes of punishment and that they keep records of punitive measures used. We perceive nothing in § 246.8 which renders invalid our conclusions reached above.
III. For the reasons above enunciated, we hold petitioner Kelly's confinement in administrative segregation was for the purpose of discipline within the meaning of § 246.31, The Code. This conclusion makes it unnecessary for us to decide whether Kelly's confinement was "solitary imprisonment" within the meaning of the provision. Our conclusion is merely that Kelly's confinement is not prohibited by statute, and this opinion should not be read as ruling upon any of the federal constitutional problems in Kelly's classification which constituted the basis for his petition in the federal courts. We are satisfied that the guidelines announced by the Circuit Court of Appeals in that matter are sufficient to protect Kelly from any possible arbitrary action by prison authorities and to ensure his placement in the prison's general population if and when such action becomes appropriate.
Based upon all of the foregoing, we affirm the action of the trial court in annulling the writ of habeas corpus.
Affirmed.
