
424 S.W.2d 193 (1968)
Bobby MARSH
v.
C. Murray HENDERSON, Warden Tennessee State Penitentiary.
Supreme Court of Tennessee.
January 26, 1968.
*194 Walter Baker Harris, Jackson, for plaintiff in error.
George F. McCanless, Atty. Gen., and Robert H. Roberts, Asst. Atty. Gen., Nashville, for the State.
BURNETT, Chief Justice.

OPINION
This is a habeas corpus petition, but it is unlike any other that we have had before this Court. After having an evidentiary hearing on this petition it was denied and an appeal has been seasonably perfected.
On April 12, 1954, the petitioner, Marsh, was arrested and charged with murder in the first degree in Madison County. In the early part of May of that year on a plea of present insanity he was committed to the Western State Hospital for hospitalization and was found insane to the extent that he could not distinguish right from wrong. He was returned to the Criminal Court of Madison County in July, 1954, and tried by a jury on the question of present insanity. The jury found him insane and incapable of advising his counsel and he was thereupon committed to the maximum security unit of Central State Hospital. On November 2, 1964, about ten years later, he was returned from Central State Hospital and on the recommendation of the District Attorney General after reading the reports from Central State the Court sent him to Western State Hospital again for a thirty-day period of hospitalization. Following this hospitalization *195 he was returned to Central State until September 9, 1965, at which time he appeared before the Criminal Court of Madison County and entered a plea of guilty to murder in the second degree and was given a sentence of not more than twenty (20) years by the jury, the minimum sentence being ten (10) years. During this period of time the defendant was confined for a total period of eleven (11) years and five (5) months, practically all of which was in a State Mental Institution of the Criminally Insane.
After he plead guilty and was sentenced as set out above, he filed his petition for habeas corpus and claimed that under § 40-3102, T.C.A., he was entitled to receive credit for the time spent in State institutions on his sentence. It was on this claim that the trial judge denied his petition, because he didn't think that he had authority to grant such habeas corpus because the statute (§ 40-3102 T.C.A.) only provided that a defendant shall receive credit "for the time he served in the jail, workhouse or penitentiary subsequent to any conviction arising out of the original offense for which he was tried." The trial judge held that the petitioner here had not been serving a sentence in any of these institutions including being committed to jail, the workhouse or any imprisonment of the kind, and thus we have the question fairly presented to us as to whether or not under the terms of the statute (§ 40-3102, T.C.A.) the serving of time in a mental institution after being arrested for an offense is such imprisonment as to authorize this time served as a credit on any sentence which the defendant may subsequently receive.
The statute is mandatory. Stubbs v. State, 216 Tenn. 567, 393 S.W.2d 150, and any void or invalid prior sentences which one has served when he is tried a second time are and must be credited to the time he receives under the second trial. Stubbs v. State, supra. The Court may allow credit for time served in jail after trial and also allow credit for such time spent in jail pending arraignment and trial. Douglass v. State, 205 Tenn. 646, 330 S.W.2d 8.
The argument on behalf of the petitioner is that he was constrained of his liberty and held in a mental institution, and that under § 33-702, T.C.A., there is created the Maximum Security Unit in the Central State Hospital for the purpose of keeping and caring for mentally ill persons held under other than civil process such as may be committed to State institutions by the courts of criminal jurisdiction or transferred there by other courts. It is argued that this amounts to requiring the petitioner to spend time in jail or prison or confinement prior to the time that he was sentenced for the crime which he is alleged to have committed and thus when he is convicted of this crime he is entitled to credit for time spent in this mental institution.
On the other hand the State argues that the statute must be strictly construed so far as the mandatory provisions apply, and that this petitioner was not retained in an institution penal in nature but was confined in a medical facility operated by the State Department of Mental Health. It is argued he was held under authority of the mental health laws after having been adjudged insane and not under any criminal laws of the State; that he was in this institution because of his health and not because he had committed any crime. Thus it is said that rather than being punished for a crime he committed, he was there to be treated for his mental condition. Apparently this treatment was successful as he was insane when committed and when he was finally tried he was not insane. There is nothing in the statutes or otherwise to show that one committed there after he had been accused of a crime is treated differently from any other citizen who is sent there for treatment.
Counsel for both the petitioner and the respondent say that they have been unable *196 to find any authority on the subject one way or the other and both approach the proposition from the standpoint above discussed. In our working up this case we have found a related question is annotated in 98 A.L.R.2d, beginning at page 687, under the heading "Effect of delay in taking defendant into custody after conviction and sentence." This note covers a multitude of things but among others there are some two or three cases which are annotated with reference to sickness and things of that type. According to these notes it is held without exception that the petitioner because of illness is not entitled to have the time thus spent for illness credited on his sentence. There are various reasons given in different cases for this. We find no case though which covers the insanity of a defendant. Most of the cases concern the proposition that the prisoner was taken from the jail to the hospital as a favor to the prisoner and not in the custody of the Sheriff or the keeper of the prisoner as their prisoner and thus the prisoner is not entitled to credit for this time.
In this annotation there is cited the case of ex parte Bugg, (1912) 163 Mo. App. 44, 145 S.W. 831, and we find upon reading this case that it is well reasoned and covers a number of situations of related matter, but none of them is insanity. That court finally comes to the conclusion that the prisoner in that case having been released from prison because he was contracting tuberculosis and had to be sent to another state, was turned loose and did go to another state and spent three or four years there and then, when he did come back and was picked up, that he should be released, the court saying this:
"We do not mean to be understood as holding that the lapse of three years or any specific time should be sufficient or be required in all cases to bar the enforcement of a judgment similar to this one, but each case should rest upon its own peculiar facts and such course followed as will best promote the ends of justice. The fine assessed may yet be collected in the same manner as if it were a judgment in a civil case."
The holdings of other courts are cited and either approved or disapproved in this Bugg case, but this case is not authority here. We are only interested with the reasoning with reference to the purpose of the confinement of a prisoner after being sentenced and that after he has been properly released after regaining his health he may be excused from serving this sentence. This case and no other that we can find comes within the confines of our statute by any means.
A statute should be construed, if practicable, so that its component parts are consistent and reasonable. Every word used is presumed to have meaning and purpose, and should be given full effect if so doing does not violate the obvious intention of the Legislature. Inconsistent phrases are to be harmonized, if possible, so as to reach the legislative intent. When we follow these guide lines it seems to us that the enumeration undertaken by the Legislature in this statute was descriptive and restrictive of the statute (§ 40-3102, T.C.A.), and if it had been intended to be limited to "county jail or workhouse pending his arraignment and trial" and others ejusdem generis the broad purposes of the statute could not have been employed without doing violence to that intent. The primary emphasis of the second paragraph of the statute is on the word "committed" and as authorizing credit for time following such a commitment. When we thus view this statute it seems to us that the words indicative of the places of commitment are descriptive of places of confinement, and not exclusive of any other lawful place of commitment and detention.
It would thus seem to us that this man is entitled to be credited with the time thus spent in a State Mental Institution, and this time must be credited on the present sentence.
