
645 P.2d 1236 (1982)
Mary B. CLARK, Appellant,
v.
STATE of Alaska, Appellee.
No. 5658.
Court of Appeals of Alaska.
June 11, 1982.
Margaret W. Berck, Asst. Public Defender, Kenai, and Dana Fabe, Public Defender, Anchorage, for appellant.
W.H. Hawley, Jr., Asst. Atty. Gen., Anchorage, and Wilson L. Condon, Atty. Gen., Juneau, for appellee.
Before BRYNER, C.J., and COATS and SINGLETON, JJ.

OPINION
COATS, Judge.
On May 31, 1980, Mary B. Clark, age twenty-six, placed her infant daughter in a campfire. She was charged with attempted murder in the first degree, AS 11.41.100(a)(1), and was acquitted on grounds of insanity. Following a disposition and commitment hearing, Superior Court Judge Ralph E. Moody ordered, pursuant to former AS 12.45.090,[1] that Clark be committed *1237 to the Commissioner of Health and Social Services, Alaska Psychiatric Institute, for a maximum period of twenty years,[2] with a progress review by the court every six months. Clark appeals to this court challenging her commitment on two related grounds: 1) that Judge Moody erred when he failed to set a term of commitment based upon a consideration of individualized factors similar to those relevant to sentencing, and 2) that the term of commitment was excessive. We reject these challenges and affirm the commitment order of the superior court.
Before addressing the issues raised in this appeal, a delineation of the pertinent facts is in order. On May 31, 1980, Clark went camping with Joseph Bradshaw, with whom she lived, and their daughter, who was less than a year old. At one point during the trip Bradshaw told Clark to put the food away. In his words,
She just sat there and then she picked up the baby and started walking towards the river and then I said, `Mary.' And she turned around and just didn't say a word, just had some smilish gleam on her face and she looked up in the sky.
Bradshaw became both worried and angered and he decided to pack up and go home. Upon returning to town, Bradshaw suggested that Clark spend a few days at the Salvation Army's Women's Shelter,[3] but a telephone call revealed they had no beds available at the time. Bradshaw then decided to resume the camping trip while keeping a close watch on Clark.
At the campsite at about 9:30 to 10:00 p.m., Bradshaw told Clark to go into the camper to fix the bed while he built a fire. A little later, Clark came out of the camper and sat on the picnic bench with the baby between her legs. When Bradshaw asked her why she had not fixed the bed, she replied that she was not going into the camper because she heard "funny noises in there."
Shortly before 11:00 p.m., Bradshaw went into the camper to light the heater so he could put the baby to bed. In his words,
Then I was down on the floor lighting it and then I heard this scream. Sort of an irritating scream ... I knew it was the baby, but I thought it was just a new type of scream growing out of the old one or something and so I continued lighting and I heard it again. That's when I got up, came outside and couldn't, I didn't see Mary sitting on the bench. And I couldn't make the direction out where the scream was coming from. Never dawned on me to look in the fire, you know. I walked over there and there she was, laying right on top of the wood I piled up there on the right hand side of the fire. So I just grabbed her out, ran back to the truck, turned the heat off and just took off and came right back to Anchorage to the hospital.
For her part, Clark gave the following account of the offense. While Bradshaw was in the camper and after she had been sitting with the baby for fifteen or twenty minutes, Clark claimed the baby "kind of passed out" and went limp. Apparently, this had happened on previous occasions, and each time, the baby had rapidly recovered.[4] But this time the baby went from *1238 the state of being limp to becoming quite stiff and curled with no movement at all. She thought that the baby was dead and that there was "no life in her"; "it wasn't any longer a baby." Clark claims she heard a man's voice saying, "just do it," "put her in the campfire," and "get it over." Then, in her words,
I heard something like a drum roll, something like thunder, and then I took her and put her in the campfire.[5] They tell me it was not right, but I felt it was something I had to do.
In talking to the police, Clark stated,
I just took my arms and just laid her right in the fire like this. It didn't even burn me. I didn't have a burn on me. I actually stuck my, half my body in the fire when I laid her in the fire, I didn't even get burned.
At this point, Clark ran into the nearby river with the intent to drown herself. People nearby, however, pulled her out of the water.
Though the baby survived, she suffered extensive injury. According to Bradshaw, in addition to the burns and subsequent scarring, his daughter lost her right ear, most of her right thumb, and half of her right little finger. Also, her right index finger is bent over due to scarring, she has limited use of her right arm due to a "cord" formed in scarring, and she has no hair on the right side of her head. As of the time of the probation officer's report (dated October 16, 1980), the baby wore a tight cap on her head so that her scars would mature smoothly. For the same reason, she wore a tight jacket with arms and a similar banding on her right leg. Bradshaw has indicated that it will take ten years to complete all of the necessary corrective surgery. However, the doctors have told Bradshaw that upon completion of the surgery, the baby's scars will be miniscule.
On August 26, 1980, Clark was indicted for the offense of attempted murder in the first degree. AS 11.31.100(d)(1) and 11.41.100(a)(1). On September 18, 1980, in superior court before Judge Ralph Moody, Clark was found not guilty by reason of insanity.[6] At the conclusion of a disposition and commitment hearing, Judge Moody, reasoning that no one knew when Clark would no longer be a danger to the public, committed Clark to the Alaska Psychiatric Institute, for the maximum period of twenty years. Under Judge Moody's order, Clark may be released whenever it is determined that she *1239 is no longer a danger to society and upon approval by the court. Her progress is to be reviewed by the court every six months.
Clark challenges her commitment under former AS 12.45.090 on the ground that Judge Moody erred in failing to base the term of commitment upon a consideration of individualized factors similar to those relevant in sentencing. She argues that if her sentence is considered in light of individualized factors similar to those which are applied in sentencing, her term of commitment is excessive.
Clark predicates her argument upon State v. Alto, 589 P.2d 402, 408 (Alaska 1979), wherein Justice Matthews, writing for the court, declared:
[A]n AS 12.45.090 commitment is not indefinite. It should have a fixed length, taking into account individualized factors similar to those relevant to sentencing, and in no event should exceed the maximum sentence for the offense. [Footnote citing State v. Chaney, 477 P.2d 441 (Alaska 1970), omitted.]
Clark argues that this language from the Alto case requires the judge to set a fixed term of commitment and means that she could only be sentenced to the maximum term if she were classified as a worst offender. Clark argues that she cannot be classified as a worst offender because she has no prior criminal record and because there is no evidence that she had ever abused her daughter prior to the incident with which she was charged. Clark also raises an important policy argument. She argues that if people who are found not guilty by reason of insanity receive longer terms than those who are found to be criminally responsible, defendants in criminal cases will be deterred from entering pleas of not guilty by reason of insanity. An argument can be made that serious constitutional problems exist if those who are found not guilty by reason of insanity receive more severe terms of institutionalization than those who are found to be criminally responsible for the same act.
As a starting point in deciding whether the trial court applied the proper factors in determining Clark's period of commitment we must first look to the language of former AS 12.45.090, which states:

Commitment after judgment of not guilty. If the jury finds the defendant not guilty on the ground of mental disease or defect and the court considers his being at large dangerous to the public peace or safety, the court shall order him to be committed to an institution authorized by the commissioner of health and social services to receive that person, and held in custody until the disease is cured or the defect corrected or he is otherwise discharged from the institution by authority of law.
It is clear from the statutory language that public safety is the paramount concern in determining the length of a commitment.
Next, we must determine to what extent the Chaney criteria would be relevant in setting a term of commitment. It seems clear that the Chaney criteria themselves are not generally applicable in deciding the length of time for which a person should be committed after he is found not guilty by reason of insanity. For instance, notions of deterrence (either special or general) have little applicability in cases involving those suffering from mental defects which, by definition, preclude grounding one's behavior on any rational consideration of the likely consequences of that behavior. Similarly, community condemnation and the reaffirmation of societal norms are inappropriate concerns where the actor, under the influence of a mental defect, could not truly appreciate the antisocial nature of his conduct.[7] That leaves us with the goals of rehabilitation and isolation of the offender to prevent criminal conduct. These remaining Chaney criteria appear to be consistent with the goals of former AS 12.45.090. In effect, the goal of isolation is already encompassed *1240 by the mandated aim of former AS 12.45.090 to secure the public safety. Similarly, the goal of rehabilitation is provided for in the statutory language which provides for the release of the offender upon the cure of the disease or the correction of the defect.[8]
We conclude that the term of an involuntary commitment should be set by considering the goals of rehabilitation of the offender and protection of the public. Clark argues that factors such as the nature of the crime and the character of the offender should be considered. We agree that these individual factors are important to consider in deciding how to best achieve the goals of rehabilitating a person who is committed and in deciding how to adequately protect the public.
Applying this approach to the instant case, we conclude that Judge Moody committed no error. First, it is clear from the record that Judge Moody predicated the commitment order upon an evaluation of the threat Clark posed to the public safety. In committing Clark for the maximum period, Judge Moody was clearly motivated by the fact that it could not be determined with any degree of certainty just how long she would continue to pose a danger to the public safety. By contrast, Clark's attorney argued that the maximum term of commitment should be imposed only upon a definite finding that Clark would in fact be dangerous for that whole time. We agree with Judge Moody that this approach is not appropriate. Judge Moody felt that setting any definite term of commitment was inappropriate when the real goal was to confine Clark only so long as she remained dangerous. But given the fact that he had no way of knowing how long Clark would remain dangerous, he chose an intermediate course of action: he committed her to the maximum twenty-year term but provided for periodic court review of her progress every six months.
This disposition falls into line with the dictates of State v. Krol, 68 N.J. 236, 344 A.2d 289 (1975)  a case which explicitly addressed the problem of determining to what extent an offender represented a danger to the public safety. In that case, the New Jersey court began by recognizing the difficulties inherent in a standard of "dangerousness." They noted that not only is the standard vague and ambiguous, it is also difficult to predict the likelihood of future harmful conduct. Furthermore, the court noted that "The practical application of a dangerousness standard is further impeded ... by the subtle but strong pressures upon decision makers to overpredict dangerousness." Id. 344 A.2d at 301. The court then spelled out the dilemma by stating:
Commitment requires that there be a substantial risk of dangerous conduct within the reasonably foreseeable future... . It is not sufficient that the state establish a possibility that defendant might commit some dangerous acts at some time in the indefinite future... . On the other hand, certainty of prediction is not required and cannot reasonably be expected.
Id. 344 A.2d at 302. The court then concluded that in formulating a commitment order, "Doubts must be resolved in favor of protecting the public... ." Id. 344 A.2d at 303. An independent analysis of the record leads us to conclude that Judge Moody had reasonable grounds to conclude that Clark posed a substantial threat to the public safety. As such, we believe that the commitment order which he formulated was both reasonable and appropriate.
*1241 Furthermore, even if there were a requirement that Clark's term of commitment should not be in excess of a term of imprisonment which would be appropriate if she were criminally responsible, we find that Clark's term of commitment was not excessive in this case. Had Clark been criminally responsible, we believe that a twenty-year term of imprisonment would not be clearly mistaken under the Chaney standards.
Clark raises one last point. She contends that her commitment was more restrictive than necessary to protect the public. Clark points out that a psychiatric evaluation from Dr. David Coons concluded:
While Mrs. Clark's treatment will in my opinion be long-term in order to be remotely successful, this does not necessarily mean that she should be psychiatrically hospitalized for a long time. In my opinion her dangerousness is extremely limited to those situations where she is in strong emotional turmoil and is most likely to be manifested in the type of a situation where the victim would be close to her and helpless. However, I still think it would be best for her treatment to begin in a hospital setting because of the intensity of that treatment; then, over a year or two, depending on her progress, the treatment could be moved in a smooth transition to an outpatient care.
Clark goes on to point out a further clarification of Dr. Coons' opinion:
I do not see Mrs. Clark as being a major danger to herself or others and at this time ... her danger appears to be quite situational. However, I still view her as being dangerous enough until the issues of her parental rights and future pregnancies are resolved that I will strongly recommend that she be in the hospital.
We believe that Dr. Coons' testimony supports Judge Moody's finding that, at the time he entered his order, Clark presented enough of a danger to justify institutionalization. It may be that in the future Clark will have a claim that there is a less restrictive means for treating her which is consistent with protecting the public. However, we do not believe that at this time the issue is ripe for review. We therefore uphold Judge Moody's order.
The commitment order of the superior court is AFFIRMED.
NOTES
[1]  AS 12.45.090 was recently amended. However, the case was argued under the former statute, which is set out on page 1239 of this opinion. We have therefore decided the case under the former statute. The new statute is much more explicit about the procedures to be followed following a finding of not guilty by reason of insanity. It codifies much of the language of State v. Alto, 589 P.2d 402 (Alaska 1979). The statute establishes that a hearing shall be held immediately after a finding of not guilty by reason of insanity and that at the hearing the defendant must show by a preponderance of the evidence that he is not suffering from a mental disease or defect which causes him to be dangerous to the public. AS 12.45.090(c). The statute further provides that the defendant's term of commitment is not to exceed the maximum term of imprisonment for the crime for which the defendant was acquitted. AS 12.45.090(d). The statute also provides for periodic review of the commitment as suggested in Alto. AS 12.45.090(e).
[2]  The maximum term of imprisonment permissible upon a conviction for attempted murder in the first degree is 20 years. AS 11.31.100(d)(1) and 12.55.125(c).
[3]  Bradshaw stated that Clark had been unusual "the whole week." It was for this reason that he decided to leave the campground and suggest that she spend some time at the shelter.
[4]  Clark thought that the baby's sickness might be a result of her incestuous relationship with Bradshaw. Though Clark could give no specific explanation as to why she thought her relationship with Bradshaw was incestuous (which in fact it was not), she believed that Bradshaw was her half brother and the son of her father.
[5]  At 10:15 p.m., approximately 45 minutes before Clark placed the baby in the fire, a park ranger passing by the campsite noted that the fire had flames about three feet high.
[6]  Clark's psychological problems apparently developed over a period of a few months. She places the onset of her difficulties as sometime around the end of February 1980. She claims that one day she "felt funny  like being high." Two days later, her problem intensified. She had the feeling that her heart stopped, and she had a "hallucination." She stated that she had the feeling that she was being watched by someone; when she looked in a mirror she saw someone standing behind her, but when she turned no one was there. This phenomenon occurred once again at a later time. She said that she had the feeling that she was imagining things; she began to hear voices and on one occasion she talked back to the voices. In particular, she heard one specific voice which she described as being male and sounding "rough." According to Clark, "He told me what a bad person I had been," and the voice said things like, "You filthy bitch, you've been nothing but trouble." Besides hearing other unusual noises, Clark stated that she began to have unusual experiences with physical objects. For instance, she stated that as far as she could tell one of the glasses in her home spontaneously broke. On the day of the offense, while Bradshaw had gone out to get some charcoal, Clark said she saw a puddle of water on her kitchen floor. She cleaned it up, took the garbage out, and returned to find another puddle. Wondering whether she was imagining things she got down to check the puddle and it was indeed wet. So she wiped it up, left to throw away a cigarette, and returned to again find another puddle. Also, Clark stated that in getting ready to go camping she had difficulty finding things.

Following a psychiatric evaluation, Dr. David Coons' final diagnosis and prognosis were: adjustment disorder with depressed mood, prognosis fair; atypical psychosis, noncurrent, but active at the time of the alleged offense, prognosis fair; and borderline personality disorder, prognosis poor.
[7]  In her brief, Clark concedes that not all of the Chaney criteria are relevant in an AS 12.45.090 commitment setting.
[8]  Under former AS 12.45.090, the goal of rehabilitation alone cannot support the imposition of a term of commitment. In State v. Johnson, 493 P.2d 1386, 1387-88 (Or. App. 1972), the Oregon statute upon which former AS 12.45.090 was modeled was analyzed, and the court held,

Dangerousness is the sole ground for commitment under ORS 136.730... . A commitment merely because the defendant's mental condition was such that institutionalization was desirable could not be made under the statute.
If the offender is not found to be dangerous, treatment may be mandated only through resort to civil commitment procedures. If the offender is found to be dangerous, rehabilitative goals should still be given weight in formulating the commitment order.
