
268 S.E.2d 56 (1980)
STATE ex rel. S. J. C.
v.
The Honorable Fred L. FOX, II, Judge.
No. 14767.
Supreme Court of Appeals of West Virginia.
July 10, 1980.
*57 Jay Montgomery Brown, Fairmont, for relator.
Chauncey H. Browning, Jr., Atty. Gen., Gregory W. Bailey, Asst. Atty. Gen., Charleston, for respondent.
McGRAW, Justice.
This original proceeding in prohibition was brought by the relator, a juvenile, to prevent the respondent, the Honorable Fred L. Fox, II, Judge of the Circuit Court of Marion County, from executing an order sentencing relator to the Department of Corrections to be placed in a juvenile correctional *58 facility. Specifically, relator contends that respondent did not give precedence to the least restrictive alternative for disposition of the juvenile prior to sentencing in violation of W.Va.Code § 49-5-13 and that respondent thereby exceeded the legitimate powers of the Circuit Court. We find merit in relator's contentions and we award the writ.
On May 17, 1979, a juvenile petition was filed in the Circuit Court of Marion County against relator, accusing him of attempting to commit armed robbery, an act which if committed by an adult would constitute a crime under W.Va.Code §§ 61-2-12 and 61-11-8. Three other individuals were also charged in connection with the attempted armed robbery. On June 25, 1979, pursuant to plea bargaining negotiations agreeable to both parties,[1] relator entered a nolo contendere admission to the allegations in the petition. The plea bargain was accepted by the juvenile court and the dispositional hearing was continued until October 19, 1979. On that date counsel for relator moved that the dispositional hearing be continued for three months to provide additional time for observation of relator's behavior before making a final determination as to the disposition. The motion was supported by the recommendation of the juvenile probation officer that the court grant additional time for observation. There being no objection by the State, respondent continued the hearing until January 15, 1980.
Due to scheduling problems the dispositional hearing was informally continued until January 23, 1980. After the presentation of evidence, respondent sentenced the relator to the custody of the Department of Corrections, recommending that he be placed either in the West Virginia Industrial Home for Boys at Pruntytown or the West Virginia Forestry Camp for Boys at Davis, for a period of not less than one nor more than two years, with credit being given for the period from October 19, 1979 to January 23, 1980. The effective date of the sentence was January 30, 1980. The motion of relator's counsel for a stay of execution until a transcript of the dispositional hearing could be prepared was denied. Relator then filed this proceeding seeking a writ of prohibition to restrain imposition of the sentence.
At the outset we note that prohibition lies to restrain enforcement of orders of a juvenile court which exceed the court's legitimate authority. See, State ex rel. C.A.H. v. Strickler, W.Va., 251 S.E.2d 222 (1979); State ex rel. E.D. v. Aldredge, W.Va., 245 S.E.2d 849 (1978); State ex rel. Smith v. Scott, W.Va., 238 S.E.2d 223 (1977). Having determined the propriety of this proceeding, we turn to the issues for our determination.
First, we note that in the case of a dispositional hearing, the juvenile court must set forth on the record its findings of fact and conclusions of law. W.Va.Code § 49-5-1(d) (1978). Those findings of fact and conclusions of law should justify the final disposition arrived at by the court. In order to justify incarceration of a juvenile, W.Va.Code § 49-5-13(b)(5) (1978) requires that the juvenile court make a determination that "no less restrictive alternative would accomplish the requisite rehabilitation of the child."[2] We do not think that *59 respondent complied with these statutory requirements in reaching its disposition and we are of the opinion that the dispositional order is void for that reason.
There was no determination on the record by respondent that there was no less restrictive dispositional alternative than incarceration which would accomplish rehabilitation of the relator as required by statute. This Court has previously held that with respect to proceedings to transfer a juvenile to the criminal jurisdiction of the circuit court, the failure of the juvenile court to make express findings as required by statute renders the transfer order void. State ex rel. E.D. v. Aldredge, W.Va., 245 S.E.2d 849 (1978). We find this principle to be equally applicable to dispositional orders. In order for a juvenile to be properly committed to a juvenile correctional facility, W.Va.Code § 49-5-13(b)(5) (1978) requires a "finding" that "no less restrictive alternative would accomplish the requisite rehabilitation of the child." The failure to set forth such a finding on the record deprives the court of authority to order such a commitment.
This is not to say that the mere recitation of the language of the statute will save an otherwise invalid dispositional order. See State v. M.M., W.Va., 256 S.E.2d 549 (1979). As we noted above, the court must set forth on the record findings of fact which support the conclusions required by the statute. These findings should be based on evidence in the record which relates directly to the factors required by the statute to be considered and which sufficiently supports the conclusions of law which must be set forth. Id. We think respondent's findings in this case would not justify the determination that relator's rehabilitation could not be accomplished by any less restrictive disposition than incarceration, even had respondent set forth such a conclusion on the record.
Respondent's findings of fact, although not specifically designated as such, are threefold: (1) that relator's three codefendants were incarcerated for their part in the attempted robbery; (2) that relator had previously been on "unofficial" probation in an adjoining county for another offense; (3) that the offense with which relator was charged was of a serious nature. Based on these findings of fact, respondent refused even to consider a less restrictive alternative to incarceration in relator's case.
First, we think the fact that relator's three codefendants were incarcerated was not material to the determination that relator's rehabilitation could not be accomplished by a less restrictive means than incarceration. Whether the rehabilitation of a child adjudged delinquent can be accomplished by any less restrictive means than incarceration is a determination which requires an inquiry into the individual needs and circumstances of the child and is not dependent on an automatic standard of comparative justice. This is only in keeping with the purpose of our juvenile law which is to promote the rehabilitation of troubled children rather than to punish them. W.Va.Code § 49-1-1(a) (1978); State ex rel. Harris v. Calendine, W.Va., 233 S.E.2d 318 (1977). This purpose is expressed with regard to dispositions in the requirement that the juvenile court arrive at a disposition which will effect the rehabilitation of the child in the least restrictive manner concomitant with the best interests of the child and of the public. W.Va.Code § 49-5-13(b) (1978). In view of the rehabilitative purpose of our juvenile law and its emphasis on individualized assessment and treatment, we must conclude that the sentence imposed on a juvenile's codefendants is neither a material nor permissible factor for the juvenile court to consider in determining the final disposition of a juvenile case and does not justify the commitment of a child to a juvenile correctional facility.[3] We think this is particularly true where, as *60 here, both counsel for the State and the juvenile probation officer indicated on the record that there were distinguishing factors which justified a different disposition in relator's case than that reached in the instance of his codefendants.
Respondent also found that relator had previously been on "unofficial" probation in another county prior to the commission of the offense and that that attempt at rehabilitation had proved "singularly unsuccessful." Respondent maintains that this fact, coupled with the serious nature of the offense of armed robbery, justified the incarceration of the child in a correctional facility. We disagree.
This Court has already stated that the gravity of the offense and previous acts of delinquency, their frequency, seriousness and relationship to the present charge are relevant considerations in determining the rehabilitative prospects of the juvenile. State ex rel. Smith v. Scott, 238 S.E.2d 223 (1978). We have also held that the nature of the offense is not alone sufficient to warrant transfer of juvenile proceedings to the criminal jurisdiction of the circuit court. State v. M.M., supra. As we stated there,
All persons who commit violent crimes are not alike in their prospects for rehabilitation. Some violent offenders can be rehabilitated, others can not be. Placing undue weight on the nature of the crime and excluding other factors assures that no distinction is made between these groups. Id., at 556.
This reasoning appears equally applicable to the determination of which of the statutorily enumerated dispositions will accomplish the rehabilitation of the child. We will proceed therefore to examine respondent's final finding of fact to determine if that finding, in conjunction with the finding that the offense was of a serious nature would have been sufficient to support the statutorily mandated threshold conclusion that relator's rehabilitation could have been accomplished by no less restrictive means than incarceration.
The "unofficial" probation to which respondent referred apparently stemmed from an incident which occurred long before the commission of the offense. Relator had been apprehended in Morgantown for riding in a stolen car with several other youths. There was some indication that relator had been drinking, but no evidence or allegation that relator had been involved in the theft of the auto or that any charges of any kind had been leveled against him because of the incident. The "unofficial" probation apparently involved a six-month period during which relator regularly reported to a probation officer and did not become involved with other criminal activities.
We are unfamiliar with the practice of placing juveniles on "unofficial probation." To us it implies, and the record here does not contradict the implication, that one is placed under the supervision and observation of a probation officer for a period of time without first having been charged in a petition for delinquency with the commission of a criminal act. We question the propriety of considering alleged delinquent acts which have never been charged when determining what disposition should be implemented with respect to a juvenile.[4]
However, even if the fact that relator was previously on "unofficial" probation were a material consideration in determining the least restrictive alternative for disposition, we think an examination of the evidence on the record would lead us to conclude that the juvenile court did not afford relator the least restrictive alternative disposition as is constitutionally and statutorily required. State ex rel. C.A.H. v. Strickler, W.Va., 251 S.E.2d 222 (1979); State ex rel. K.W. v. Werner, W.Va., 242 S.E.2d 907 (1978). Respondent, in refusing to consider a less restrictive dispositional *61 alternative for relator, ignored the overwhelming evidence that at the time of the dispositional hearing relator had made great strides in reforming his behavior. The record of the October hearing shows that respondent afforded relator a continuance on the dispositional hearing upon "the theory that there is some effort being made by the juvenile to conform his conduct." This was done on the motion of counsel, the recommendation of the juvenile probation officer and without objection by the State, which relied upon the probation officer's representation that the grant of an additional period of time to observe relator's behavior was in the best interest of the child.
The testimony adduced at both hearings was to the effect that relator had shown marked improvement in his behavior since the commission of the offense, and that he had been working and had not been charged with any new criminal offenses. Specifically, the juvenile probation officer reported that relator had continued to perform well at work during the improvement period, that he had a perfect attendance record, that he caused no trouble on the job, that he performed all the tasks required of him, and that his supervisors were impressed with him. A letter from relator's supervisor to this effect was also introduced into evidence. The probation officer also testified that relator had been "acting as good as anyone could expect a boy to act on probation," and that his relationship with his family had improved considerably. This was supported by the testimony of relator's father and stepmother that relator was more helpful at home and that they were able to communicate with him more since he had been under observation. Both parents indicated that relator enjoyed working and did not like to miss work, that he no longer drank alcoholic beverages and that he was always home on time or earlier on the two nights a week he was allowed to go out. This was in marked contrast to relator's previous inability to communicate with his family and his penchant for running away from home for several weeks at a time. Relator's stepmother stated that she felt the change in relator's attitudes and conduct was due more to maturity than to strict supervision and that he appeared to appreciate the wrongfulness of his prior conduct. Based on his observations, the juvenile probation officer recommended that relator be placed on probation for a period of one to three years.
In view of the evidence adduced at the dispositional hearings we think that the respondent placed undue emphasis on the prior acts of the juvenile and on the nature of the offense. While prior delinquent acts of the child and the nature of the offense may figure prominently in the dispositional stage of a juvenile case, so too must consideration be given to the fact that children, as they grow older, may recognize the wrongfulness of their prior conduct and attempt to change. The conduct of the child during a period of observation serves as an indication of the possibility of rehabilitation at the time of the dispositional hearing and reflects possible changes in his bahavior and temperament which may preclude the harsh necessity of incarcerating him in a correctional facility to achieve that goal. In considering the least restrictive dispositional alternative for sentencing a juvenile, a juvenile court must consider the reasonable prospects for rehabilitation of the child as they appear at the time of the dispositional hearing, with due weight given to any improvement in the child's behavior between the time the offense was committed and the time sentence is passed. We think that the record here amply demonstrates a conscious effort by the relator to conform his attitudes and conduct to acceptable societal norms at the time of the dispositional hearing and that respondent was clearly wrong in not giving due consideration to the evidence supporting such a conclusion.
At this point we note one other aspect of this case that troubles us. Throughout the proceedings below, respondent indicated an unusual attitude toward relator's case. Respondent berated the probation officer for recommending probation in relator's case and denied that the court had granted any sort of continuance to observe relator's behavior. *62 Respondent also condemned the assistant prosecuting attorney for not proceeding diligently with the case and for declining to make a recommendation with respect to the disposition as required by the plea-bargaining agreement. Respondent also admonished the prosecutor to cease "attempting to justify disposition of this case on behalf of the defendant" and stated that "I am not going to allow that to happen."
These comments and others leave the reader of the record with the uneasy feeling that at an early point certain results had already been foreclosed. While we make no determination as to the possible prejudicial implications of these remarks, and while no allegation was made to that effect, we feel constrained to point out of record once again our distaste for "[h]earings without substance, moving mechanically to a preconceived result . . ." State v. M.M., supra, at 557.
For the reasons stated above, we conclude that the juvenile court, by failing to make findings of fact and conclusions of law as required by statute and consistent with the evidence, exceeded the scope of its legitimate authority and the dispositional order of that court sentencing the relator to confinement in a juvenile correctional facility is void. We award the writ of prohibition prayed for to prevent execution of the sentence and remand the case to the juvenile jurisdiction of the Circuit Court of Marion County for further proceedings in accordance with the principles enunciated herein.
Writ awarded; remanded for further proceedings.
NOTES
[1]  Under the terms of the plea bargaining agreement, the relator agreed to enter a nolo contendere admission to the allegations in the petition and to testify for the State against the other three individuals involved in the attempted robbery. The State agreed not to transfer the proceeding to the criminal jurisdiction of the circuit court, not to make recommendations at the dispositional hearing and to dismiss another juvenile proceeding pending against relator.
[2]  Although the statute characterizes the determination to be made by the juvenile court as a "finding," it is not a finding of fact. Rather the determination is more properly a conclusion of law which is based on the findings of fact of the court. As we recently stated:

A finding of fact is a statement of fact in evidence or a fact properly inferable therefrom. Conclusions of law arise from findings of fact based on evidence in the record; evidence that should relate directly to the factors required by statute to be considered; evidence that should constitute clear and convincing proof in support of the conclusions of law set forth. State v. M.M., W.Va., 256 S.E.2d 549 at 556 (1979).
[3]  We note that it is a well-established principle of the criminal law that a criminal defendant is entitled to have his punishment determined by the evidence against him and not by the sentence imposed in another criminal prosecution against an accomplice, codefendant or anyone else. See, Walker v. Com., 212 Va. 289, 183 S.E.2d 739 (1971).
[4]  We are aware of W.Va.Code § 49-5-9(b) (1978) which provides that upon motion of the child the juvenile court may grant a pre-adjudication non-custodial improvement period of up to one year. This provision does not come into play, however, until after the juvenile petition has been filed with the court. There is no indication here that the relator was ever charged by petition with any offense as a result of the incident in Morgantown.
