
161 N.W.2d 667 (1968)
STATE of Minnesota ex rel. Philip STANGVIK, Appellant,
v.
Ralph H. TAHASH, Warden Minnesota State Prison, Respondent.
No. 40732.
Supreme Court of Minnesota.
September 13, 1968.
*668 C. Paul Jones, Public Defender, and Robert Oliphant, Asst. Public Defender, Minneapolis, for appellant.
Douglas M. Head, Atty. Gen., David J. Byron, Sp. Asst. Atty. Gen., St. Paul, for respondent.

OPINION
OTIS, Justice.[1]
Relator has pled guilty to the murder of his wife and two children. He is serving a life sentence and two concurrent sentences of 40 years each. He appeals from an order of the district court discharging a writ of habeas corpus. There are three issues: (1) Whether it was error for the trial court to accept a plea of guilty in the light of relator's commitment to a mental hospital when the crimes occurred; (2) whether relator was induced to plead guilty out of fear he would be returned to a state hospital; and (3) whether under Minn.St. 609.035 relator could be sentenced for more than one of the offenses.
1. We decline to hold that a defendant, who is charged with perpetrating a crime at a time when he is under commitment to a state mental hospital, is obliged to stand trial on the question of whether he was at the time of the offense responsible for his actions under § 611.026,[2] if when he pleads guilty he is adequately represented by counsel and there is no other evidence before the sentencing court to support a defense of insanity.
*669 In resolving this issue, it is necessary to recite in some detail the chronology of events which resulted in these convictions. In November 1961, relator was taken from the Hennepin County jail to the psychiatric ward of Glenwood Hills Hospital for observation after being charged with assaulting his wife and threatening to kill their children. The probate court thereupon committed him to the St. Peter State Security Hospital where he remained until May 17, 1962, when he was restored to capacity. About a year later, on April 22, 1963, he was committed to the Fergus Falls State Hospital by the probate court of Otter Tail County. The hospital record, prepared at the time of his admission in 1963, disclosed the following:
"The patient has had delusional thinking in that he has been convinced that his wife has been unfaithful to him, and that she has put things in his food that would be harmful to him. * * *
* * * * * *
"* * * In Sept. 1961 he tried to smother his daughter with a pillow. Eventually, in Oct. 1961, he was angry at his wife because she did not hurry to iron a shirt as soon as she got home from work. He held her arm behind her back and twisted it until he broke it. He had previously held a knife to her back and threatened to kill her."
Relator's wife joined in petitioning for his discharge in May 1962. However, the hospital report goes on to say:
"* * * He has recently been hitting the children and getting angry for nothing, and then, on the other hand, he would be extremely indulgent toward them when he should be firm. * * * All of the above behavior made the informant [wife] and his parents think perhaps he should be observed in a mental hospital."
By the end of May 1963, defendant was permitted to visit his parents for periods of 3 days at 10-day intervals. It was during one of such visits on July 4, 1963, that he stabbed to death his wife and two children.
Relator was apprehended on July 6, 1963, and indicted for murder on July 22, 1963. He was first arraigned on September 23, 1963, at which time counsel was appointed to represent him. Thereupon, the matter was continued without a plea until October 8, when counsel entered a plea of not guilty.
On November 12, 1963, relator petitioned the court for an order holding him incapable of conducting his own defense by virtue of insanity as provided by § 611.026. Accordingly, the court appointed a commission consisting of a psychologist, a psychiatrist, and a probate judge to inquire into the matter. On January 13, 1964, the commission filed a detailed report which concluded with a finding that relator was not in a state of idiocy, imbecility, lunacy or insanity so as to be incapable of understanding the criminal proceedings pending against him or making a defense thereto.
Relator readily admitted to the commission that he had killed his wife. Among other things, he indicated a desire to accept punishment, adding, "I am tired of institutions." However, in the same interview he stated he did not mind being in the hospital. Thereafter, he told the commission, "If I was in a mental institution, I would be there the rest of my life. * * * [I]n prison I will have a chance to obtain a parole."
The trial court adopted the commission's findings and ordered relator to stand trial. Concurrently, the court denied a motion made on November 12, 1963, "for an Order finding that said defendant, Philip C. Stangvik, at the time of committing the alleged criminal acts was laboring under such a defect of reason as not to know the nature of his acts or that they were wrong." The motion was denied with a memo attached by the Honorable Rol E. Barron as follows:
"There is no showing in the slightest that on the date of the crime, to-wit: July 4, 1963, Philip C. Stangvik was in a state of insanity as not to know the nature *670 of his acts or that they were wrong."
Thereafter, venue was changed to Clay County. On April 27, 1964, Judge Barron summoned relator, his counsel, and the prosecutor, and read them a letter which he had just received from relator, as follows:
"When I committed this crime last year, July 4, 1963 about 11:00 p. m. I knew what I was doing all the time, and I still know it, and that's why I can't see that people think there is something wrong with me. I know myself better than anyone, and there is definitely nothing wrong with me. I am no different now than when I was 20 years old. I am very sorry I have committed this crime, but it's too late now to go back and look in the past."
The court further stated that it was his understanding from counsel that defendant wished to plead guilty to three indictments for murder and that the state would reduce the charges involving the death of relator's children from first degree murder to second degree if relator pled guilty to first degree murder with respect to the death of his wife. Counsel acquiesced. Thereupon, relator was interrogated by the court and stated that he was presently sane and was sane at the time he committed the murders; that he knew what he was doing and knew that it was wrong; that no one had used any threats or coercion or promises of any kind to change his plea to guilty; and that he was entering a plea of guilty of his own free will. Counsel then asked relator for the record whether he had advised relator to plead guilty, to which relator answered in the negative. Counsel stated he wished the record to show that the plea of guilty was relator's own idea. Before imposing sentence, the court asked relator whether he realized that a life sentence for first degree murder was mandatory, to which relator answered in the affirmative. Thereupon, he was sentenced to life imprisonment on the indictment for murder in the first degree and 40 years on each of the other two indictments for murder in the second degree, all of the sentences to run concurrently.
The petition for a writ of habeas corpus, executed in July 1966, resulted in an evidentiary hearing in the District Court of Washington County. There relator testified that he had written to Judge Barron to avoid being sent to St. Peter. His counsel had advised him that if he pled not guilty by reason of insanity he "would probably go to St. Peter for about 15 years." On cross-examination, relator was interrogated with respect to a confession he had given the sheriff shortly after he was first apprehended. He admitted that his confession was correct in relating that he had stabbed and killed his wife and children and in the recitation that he had planned the crimes for some time. However, notwithstanding his confession and his letter to Judge Barron, in the habeas corpus hearing he denied that he knew what he was doing the night of the crime. He conceded, however, that he made a contrary statement to his counsel.
At the habeas corpus hearing, the attorney who represented relator in the trial court testified by deposition. He recited the unsuccessful attempts he had made to have relator examined by a qualified expert in anticipation of the defense of insanity, and how, at the hearing called by Judge Barron, he had advised relator not to enter a plea of guilty but to stand trial, and in any event to complete the examinations scheduled for that week. Defendant refused the advice. According to his counsel defendant said he would rather spend his time in Stillwater than in St. Peter. Relator was apprised of the consequences of pleading guilty, and his right to plead not guilty by reason of insanity, which, if successful, would result in his being sent to an institution without the stigma of having committed murder. "I tried to hammer home that point but he would not listen to me." Counsel told relator that even without expert testimony a jury might find him not guilty if he didn't know the difference between right and *671 wrong. Counsel concluded by testifying that relator appeared rational at the time of arraignment and seemed to understand what was told him. In fact, counsel was of the opinion that relator should not take the witness stand because his rational appearance would convict him.
The Washington County District Court found:
"That each plea was entered by Philip C. Stangvik, petitioner herein, knowingly, willingly and voluntarily and at his own insistence during the time at which he was represented by competent counsel and that said petitioner was at all times during the critical stages of the proceedings surrounding his conviction well and ably presented by competent counsel."
The court concluded that relator was entitled to no relief. In an accompanying memorandum, the court noted that qualified medical authority had declared relator to be legally sane, both at the time of trial and at the time the crimes were committed.
We agree there is nothing in the record on which the court could base a finding that relator's plea of guilty was coerced or was not voluntarily or intelligently entered. All of the evidence is to the contrary. Three experts found relator capable of standing trial. The court concurred. Relator's own attorney fully advised him of his rights and the consequences of his plea, and attempted to dissuade him from pleading guilty. He too was of the opinion that relator was mentally competent to make his own decision. Even relator does not claim that he did not understand his rights. He relies on the contention, first advanced at the habeas corpus hearing, that he was induced to plead guilty by his own subjective aversion to being returned to a mental hospital. He does not suggest that there was any coercion or inducement imposed by anyone else. The thrust of the argument here is that his prior history of mental illness imposed on the court a duty to refuse a plea of guilty to permit a defense of insanity to be litigated. In that respect the case is unlike State v. Jensen, 278 Minn. 212, 153 N.W.2d 339, where we held that prior insanity of a permanent type is presumed to continue and imposes on the court an obligation to conduct a hearing with respect to the capacity of the accused to defend himself. Whether relator was criminally responsible within the meaning of § 611.026 when he killed his wife and children is not the critical issue. All that we have before us is whether relator was competent to enter a plea of guilty and thereby waive the defense of insanity. State v. Seebold, 280 Minn. 241, 158 N.W.2d 854.
In view of the facts which we have recited, we hold as a matter of law that the conclusions of the habeas corpus court were fully supported by the record. Consequently, neither the trial court nor the habeas court was obliged to set aside relator's plea of guilty.
2. Relator asserts that the imposition of three concurrent terms was in violation of § 609.035. That statute provides as follows:
"Except as provided in section 609.585, if a person's conduct constitutes more than one offense under the laws of this state he may be punished for only one of such offenses and a conviction or acquittal of any one of them is a bar to prosecution for any other of them. All such offenses may be included in one prosecution which shall be stated in separate counts."
The statute did not become effective until September 1, 1963. The offenses of which relator was convicted occurred prior to that date but the sentences were imposed subsequent to it. The question is whether the statute governs substantive law, in which case it is not retroactive, or whether it is merely procedural, and therefore applies. In State ex rel. Boswell v. Tahash, 278 Minn. 408, 414, 154 N.W.2d 813, 817, we noted that the statute was not retroactive. That was a habeas corpus matter, however, and both the offense and the sentence occurred prior to the effective date of the statute. Where, as here, the sentence *672 was not pronounced until after § 609.035 became effective, we hold that it is a procedural law which governed the sentences.
This is the first case in which we have been called on to decide whether multiple crimes against multiple victims permit the imposition of more than one sentence. We hold that in these circumstances three separate sentences were authorized. Without attempting an exhaustive analysis of the cases construing § 609.035, the guidelines which have emerged from our decisions make it clear that the legislature did not intend in every case to immunize offenders from the consequences of separate crimes intentionally committed in a single episode against more than one individual. City of Bloomington v. Kossow, 269 Minn. 467, 131 N.W.2d 206; State v. Johnson, 273 Minn. 394, 405, 141 N.W.2d 517, 525; State v. Reiland, 274 Minn. 121, 124, 142 N.W.2d 635, 638; State v. Gladden, 274 Minn. 533, 144 N.W.2d 779; State v. Murphy, 277 Minn. 355, 152 N.W.2d 507; State v. Gaulke, Minn., 161 N.W.2d 662, filed September 6, 1968.[3] In the Johnson case we said that the test was whether the segment of conduct involved was motivated by an effort to obtain a single criminal objective. That case simply involved two traffic violations. Although we held that defendant had waived his rights under the statute, we also found that the violations constituted a single behavioral incident, which we defined as one where multiple violations "occur at substantially the same time and place and arise out of a continuous and uninterrupted course of conduct, manifesting an indivisible state of mind or coincident errors of judgment." In the Reiland case we stressed the necessity for finding a substantial relationship between the types of conduct constituting each offense, and indicated that it must be the result of a single motivation directed toward a single goal. The philosophy behind the statute, we said, was to protect against exaggerating the criminality of a person's conduct and to make both punishment and prosecution commensurate with culpability.
The California court has construed a similar statute to permit separate sentences for crimes against multiple victims.[4] Neal v. State, 55 Cal.2d 11, 9 Cal.Rptr. 607, 357 P.2d 839; People v. Ridley, 63 Cal.2d 671, 47 Cal.Rptr. 796, 408 P.2d 124. The Ridley case was a prosecution on a number of counts of robbery and assault for which defendants were denied the benefit of the single-sentence statute. The court held (63 Cal.2d 678, 47 Cal.Rptr. 800, 408 P.2d 128):
"* * * [T]he purpose of the protection against multiple punishment is to insure that the defendant's punishment will be commensurate with his criminal liability and a defendant who commits an act of violence with the intent to harm more than one person or by means likely to cause harm to several persons is more culpable than a defendant who harms only one person."
To the same effect are In re Ford, 66 Cal.2d 183, 57 Cal.Rptr. 129, 424 P.2d 681 and People ex rel. Eldard v. La Vallee, 15 A.D. 2d 611, 222 N.Y.S.2d 462.
As we have noted in other cases, we cannot anticipate all of the circumstances which will require the application of § 609.035. Its basic purpose, however, is to leaven the harshness which may result from multiple prosecutions arising out of a single criminal episode. A defendant who commits an armed robbery against one victim, effects his escape by using a second victim as a hostage, and steals a getaway car from a third victim, has committed three felonies in one behavioral incident for a single criminal objective. He might present a more persuasive case. Even then, much would depend on the harm inflicted and whether multiple sentences would result *673 in punishment grossly out of proportion to the gravity of the offense.
In the instant case the imposition of three sentences does not offend our sense of justice. The fact that the crimes occurred at substantially the same time and place as part of a single behavioral incident does not in itself require the application of the statute. These were three separate murders intentionally inflicted on three separate victims. From a legal point of view they were totally unrelated. We therefore hold that it was proper to impose separate sentences. The trial court was not insensitive to the severity of the punishment. He permitted two of the charges to be reduced from murder in the first degree to murder in the second degree and made all three sentences concurrent. The convictions are therefore affirmed.
Affirmed.
NOTES
[1]  The author of this opinion being unavoidably absent on the date of hearing has heard the oral arguments by tape recording.
[2]  Minn.St. 611.026 provides: "No person shall be tried, sentenced, or punished for any crime while in a state of idiocy, imbecility, lunacy, or insanity, so as to be incapable of understanding the proceedings or making a defense; but he shall not be excused from criminal liability except upon proof that at the time of committing the alleged criminal act he was laboring under such a defect of reason, from one of these causes, as not to know the nature of his act, or that it was wrong."
[3]  See, also, 50 Minn.L.Rev. 1119.
[4]  California Penal Code, § 654, provides in part: "An act or omission which is made punishable in different ways by different provisions of this Code may be punished under either of such provisions, but in no case can it be punished under more than one."
