
282 N.W.2d 704 (1979)
STATE of Iowa, Appellee,
v.
Allen Dean KEMPF, Appellant.
No. 63388.
Supreme Court of Iowa.
August 29, 1979.
*705 John D. Hudson, of Carney, Hudson & Williams, Des Moines, for appellant.
Thomas J. Miller, Atty. Gen., and Selwyn D. Dallyn, Asst. Atty. Gen., for appellee.
Considered by REYNOLDSON, C. J., and REES, McCORMICK, ALLBEE, and LARSON, JJ.
McCORMICK, Justice.
Defendant Allen Dean Kempf is a juvenile who was charged with delinquency based upon his alleged participation in the December 28, 1978, robbery of the Farmer's and Trader's Savings Bank of Douds. The trial court overruled his motion for psychiatric examination and, after hearing, sustained the State's motion to transfer the *706 case for prosecution under the criminal law. After transfer, defendant tendered a guilty plea to the charge of robbery in the second degree in violation of section 711.3, The Code 1979, over the objection of his lawyer, who alleged he was incompetent to plead guilty. The trial court accepted the guilty plea and ordered a psychiatric examination as part of the presentence investigation. Despite a psychiatric report which noted defendant had severe intellectual and emotional deficiencies, the trial court overruled defendant's motion to return the case to juvenile court for disposition and sentenced him to a term not to exceed ten years in the penitentiary. In this appeal defendant challenges his conviction and the principal rulings of the trial court. We reverse and remand.
The main question is whether the trial court erred in accepting defendant's guilty plea when an issue of his competency allegedly existed.
This case comes within the error preservation rule of State v. Gardner, 274 N.W.2d 328, 329 (Iowa 1979), rather than State v. Reaves, 254 N.W.2d 488, 493 (Iowa 1977), or Iowa R.Crim.P. 23(3)(a). Therefore we need not decide whether it would otherwise have been necessary for defendant to raise the issue of his competency to plead guilty in a motion in arrest of judgment. See § 812.3, The Code 1979; cf. Carstens v. Rans, 210 N.W.2d 663, 665 (Iowa 1973) (defendant did not waive competency issue under predecessor statute by failing to urge incompetency at trial).
The standard for ascertaining a defendant's competency is delineated in section 812.3, which provides:
If at any stage of a criminal proceeding it reasonably appears that the defendant is suffering from a mental disorder which prevents him or her from appreciating the charge, understanding the proceedings, or assisting effectively in the defense, further proceedings must be suspended and a hearing had upon that question.
This statute supplants section 783.1, The Code 1977, which provided:
If a defendant appears in any stage of the trial of a criminal prosecution, and a reasonable doubt arises as to his sanity, further proceedings must be suspended and a trial had upon that question.
The standard in section 812.3 for determining competency is a codification of the standard for determining "sanity" prescribed in cases decided under the prior statute. See, e. g., Hickey v. District Court, 174 N.W.2d 406, 409 (Iowa 1970).
However, the statutes differ in two important respects. First, whereas the prior statute required a hearing on competency when a "reasonable doubt" arose, the present statute requires a hearing when a question of competency under the statutory standard "reasonably appears." Second, while the competency determination was previously made in a jury trial, it is now to be made in a hearing conducted by the court. See § 812.4.
Our prior cases explained the reasonable doubt concept in section 783.1 in part by saying such doubt existed when the trial court possessed information "sufficient to warrant a man of reasonable caution to believe the accused in a criminal matter can or cannot appreciate the charge against him, understand the proceedings, and help conduct his defense." E. g., Hickey v. District Court, 174 N.W.2d at 410. Those cases also said the determination of the existence of a reasonable doubt involved an exercise of judicial discretion. E. g., State v. Evans, 259 N.W.2d 789, 792 (Iowa 1977). Despite this, upon review we made our own independent examination of the record to determine whether a reasonable doubt existed. E. g., State v. Walton, 228 N.W.2d 21, 24 (Iowa 1975). We believe the legislature changed the language of the statute in an effort to simplify the test for determining when a competency hearing should be held.
We conclude that the present statute requires a hearing on the issue of competency when the record contains information from which a reasonable person would believe a substantial question of the defendant's competency exists. The question is a *707 legal one. Trial court discretion is not involved.
When the defendant's competency during trial court proceedings is challenged on appeal, our task is to examine the information before the trial court to determine if at the relevant time an unresolved question of the defendant's competency reasonably appeared. Because constitutional safeguards are implicated, we make our own evaluation of the totality of the circumstances. State v. Thomas, 205 N.W.2d 717, 721 (Iowa 1973). This means we review the record de novo. Bettuo v. Pelton, 260 N.W.2d 423, 425 (Iowa 1977).
A guilty plea proceeding is a "stage of a criminal proceeding" for purposes of section 812.3. See State v. Evans, 259 N.W.2d at 792.
Furthermore, when a question of competency exists the validity of a guilty plea cannot be determined merely by examining the trial court's compliance with State v. Sisco, 169 N.W.2d 542 (Iowa 1969), and Brainard v. State, 222 N.W.2d 711 (Iowa 1974). The Sisco-Brainard procedures assume the competency of the defendant to enter the plea and do not involve an inquiry into his mental capacity. State v. Walton, 228 N.W.2d at 24.
With this background, we turn to the evidence. At the time of the alleged offense and plea proceeding defendant was sixteen years old. According to his father he was expelled from school on the first day of seventh grade for "leaning his chair back." He spent approximately three additional years in special education.
From the outset defendant's trial court attorney, C. K. Pettit, raised the question of his competency. When the case was still in juvenile court he moved that defendant undergo a psychiatric examination at state expense. Defendant was the only witness at the hearing on the motion. In response to routine questions of counsel, he testified he could not remember how long he had been in jail. He said he had "sort of" been in special education until sometime in 1978 but could not remember the month he quit school. He asserted he could not remember when he last had a job. He said he had not had very many. He also said he had some money but could not remember how much. He had never undergone a mental evaluation. No other evidence was presented, and the motion for examination was overruled.
At the hearing on the State's motion to transfer the case to criminal court, a probation officer testified defendant's only prior contact with the law involved a child in need of assistance adjudication in Wapello County in March 1977 based on a theft of money from parking meters in Ottumwa. He had been released from probation in November 1978. The only other witness in that proceeding was defendant's father who testified that defendant had learned nothing in special education, had gotten into trouble through the influence of his friends, and needed guidance.
After transfer of the case to criminal court, defendant deluged his attorney with letters from the jail expressing in a rambling, confused and desperate way his feeling that the judge had already decided to send him to prison. He said he was "going crazy" in jail and desired to plead guilty and get started on his prison time to "get it over with."
At defendant's insistence and over his lawyer's objection and allegation of his incompetency, defendant entered a guilty plea to the charge of robbery in the second degree. Largely through leading questions, the trial court conducted the regular Sisco-Brainard interrogation. Defendant made appropriate acknowledgements regarding his understanding and intentions.
However, under questioning by his attorney he said he wanted to plead guilty "to get this over with." When asked why, he said, "Ain't nothing to do up there hardly," presumably referring to the county jail.
The trial court accepted the plea but said that, in view of attorney Pettit's concern, a psychiatric examination would be ordered as part of the presentence investigation in order to obtain information regarding defendant's understanding of the nature of the charge and consequences of his plea.
*708 At the time fixed for sentencing, the trial court reviewed the presentence and psychiatric reports preparatory to ruling on defendant's motion to remand the case to juvenile court for disposition. The presentence report disclosed a claim by defendant that he had been drinking alcoholic beverages since he was thirteen and that alcohol had become a major problem for him. In his version of the bank robbery, he said:
They said they'd buy me a six pack if I'd help rob the bank and I'd already had six beers. That's what got me into this. We just did it. Tim and Tom thought of the idea. Just drove off after we did it.
The court interrogated him as follows:
THE COURT: Now, with respect to item number four, it says that you claimed that the reason that you helped rob the bank was because somebody told you they would buy you a six-pack of beer and you had already had six beers.
DEFENDANT: Yeah.
THE COURT: Are you trying to tell me you were so drunk you didn't know what you were doing?
DEFENDANT: Yeah.
THE COURT: In that case, I cannot accept your plea of guilty.
DEFENDANT: No.
THE COURT: No what? If you are telling me you were so drunk you did not know what you were doing, I am not accepting your plea of guilty that you gave me two weeks ago, and I will set it aside.
DEFENDANT: No.
THE COURT: What are you telling me?
DEFENDANT: I don't know. It just happened.
THE COURT: You had been You had consumed six beers that morning?
DEFENDANT: Yeah.
THE COURT: You were drunk?
DEFENDANT: No, not really.
THE COURT: Over how long a period of time did you consume the beer?
DEFENDANT: Eight.
THE COURT: You started at 8?
DEFENDANT: Yeah.
THE COURT: The bank was robbed about what time?
DEFENDANT: I don't know what time it was.
THE COURT: Minutes of testimony that are attached to the Trial Information that have been filed here suggest that it was around 10 o'clock in the morning if I am reading it correctly. What is your information, Mr. County Attorney, the time the bank was allegedlythe time the bank was robbed?
MR. LYTLE: In the vicinity of 10 o'clock.
THE COURT: In the vicinity of 10 o'clock. Are you telling me that you drank six beers in the two-hourin a two hour period?
DEFENDANT: Huh-uh.
THE COURT: No?
DEFENDANT: No.
THE COURT: What are you telling me?
DEFENDANT: Drank them.
THE COURT: Over how long a period of time?
DEFENDANT: Hour.
THE COURT: An hour.
DEFENDANT: Yeah.
THE COURT: How sure are you it was six?
DEFENDANT: Yes, it was six.
THE COURT: How sure are you it was six?
DEFENDANT: I'm sure.
THE COURT: Then you were under the influence of an alcoholic beverage at the time this offense was supposed to have been committed?
DEFENDANT: I think so.
THE COURT: You think so. Did your consumption of these alcoholic beveragesor beer make you so drunk you didn't know what you were doing?
DEFENDANT: No.
THE COURT: No. You knew what you were doing?
DEFENDANT: Yeah.
THE COURT: And did you know what you were doing was wrong?
*709 DEFENDANT: Yeah.
Defendant's attorney introduced into evidence defendant's letters from the jail and the court-ordered psychiatric report of Dr. Harry A. Mahannah of Ottumwa. The report included the following:
My impressions of Allen are that he is of borderline intelligence. He has had extremely limited social experience. His personality development is delayed or immature, basically in all areas. I noted serious limitation in areas such as, understanding relationships with people, understanding society's attitude, emotional control, and understanding reality.
I feel that Allen's emotional development is significantly lower than his chronologic age. It is my opinion that he would be most appropriately handled through the juvenile court system than through the adult court system. I feel that involvement in the adult penal system could do significant harm to this individual.
After argument on defendant's motion to remand for disposition in juvenile court, the court said:
From a procedural standpoint, this Court does not find it is necessary for the State to resist. The reason we are here in the first place was the State's application that the juvenile be handled as an adult. The Court has considered both the presentence investigation and Dr. Mahannah's report. Dr. Mahannah, as I recall, was asked by the Court to determine, based upon Mr. Pettit's concerns expressed to the Court and also based upon the letters that Mr. Pettit had at that time received from the defendant, Mr. Pettit was concerned that the defendant either did not understand the difference between right and wrong or if understanding, then his intellect was such that he washad a diminished capacity to be held responsible for the crime with which he was charged which was armed robbery. That was the purpose of the Court's referring the defendant to Dr. Mahannah for Dr. Mahannah's opinion. Dr. Mahannah has chosen in his letter of February 27, 1979, to ignore the purpose for which the Court sent Mr. Kempf to him and has instead gone off on a frolic of his own to have himself sit in judgment on this young man. That is the function of this Court and not Dr. Mahannah. The Court is therefore disregarding Dr. Mahannah's recommendations and Dr. Mahannah's report except that the Court assumes that by his silence, by his failing to answer the questions that Allen was sent up there for, that he is tacitly acknowledging to this Court that Allen does know the difference between right and wrong and that Allen had sufficient intelligence in order to form intent on the 28th day of December, 1978, and that the defense of diminished capacity would thus not be available to him.
The court then overruled the motion for remand and proceeded to sentence defendant to a term not to exceed ten years in the penitentiary.
In sum, the record shows a sixteen-year-old youth of borderline intelligence with emotional development lower than his age. He had limited experience with the legal system, difficulty in remembering basic events in his life, and a limited grasp of reality. He found jail intolerable and considered prison inevitable. He was allowed to plead guilty against the advice of his attorney, who questioned his competency. His guilty plea was permitted to stand even though the presentence investigation and psychiatric report lent additional substance to this concern. The trial court was troubled by defendant's presentence report claim about drinking but used the psychiatric report against defendant because of an irrelevant belief it answered questions the court had not asked.
It is not necessary that any one of these factors be sufficient to cause a reasonable person to conclude a substantial question of defendant's competency to plead guilty existed. The issue is determined by their cumulative effect. When viewed together they reveal circumstances from which a question of competency reasonably appears within the meaning of section 812.3.
*710 This conclusion is reinforced when the circumstances are examined in the light of the trial court's particularly stringent duty to make certain that the rights of a child charged in criminal court are fully protected. See Rinehart v. Brewer, 561 F.2d 126, 130 (8th Cir. 1977).
The evidence raising a question of competency in this case is not as strong as that involved in a number of cases requiring competency determinations under the predecessor statute, including State v. Evans, State v. Walton, State v. Bordovsky, 183 N.W.2d 170 (Iowa 1971), Hickey v. District Court, 174 N.W.2d 406 (Iowa 1970), and State v. Hamilton, 247 Iowa 768, 76 N.W.2d 184 (1956). However, the showing is stronger than in the two contrary holdings on which the State relies, State v. Thomas, 205 N.W.2d 717 (Iowa 1973), and State v. Stoddard, 180 N.W.2d 448 (Iowa 1970).
In Thomas the defendant, who was an adult, had been found competent by a jury after a competency trial, and medical evidence, although conflicting, tended to establish he was competent. His intelligence level was not shown. Moreover, nothing said by Thomas during his guilty plea proceeding raised a question as to his competency.
In Stoddard evidence showed the defendant had borderline intelligence and was emotionally immature. However, Stoddard was not a juvenile. Furthermore, the court deemed it a significant factor that his attorney did not move for a competency determination. Other substantial factual differences exist between the situation disclosed in Stoddard and the present case.
The Thomas and Stoddard cases are plainly distinguishable.
Without deciding whether the record was sufficient to raise the question earlier, we hold that, at least by the time the trial court was reconsidering its acceptance of the guilty plea in the presentence hearing, it reasonably appeared that defendant suffered from a mental disorder preventing him from appreciating the charge, understanding the proceedings, or assisting effectively in the defense. His guilty plea should not have been permitted to stand when the facts giving rise to this question came to the attention of the trial court.
Defendant's conviction must be reversed and the case remanded for a competency hearing pursuant to section 812.3. If, upon hearing, the defendant is found incompetent, further proceedings shall be governed by section 812.4.
If defendant is found competent, or if he is found incompetent but his competency is restored, further proceedings are dependent on our disposition of another of his assignments of error. This is his claim that the trial court erred in sustaining the State's motion to transfer the case to criminal court.
Transfer procedures here were governed by section 232.72, The Code 1977. They are considerably more structured under the present Code. See § 232.45, The Code 1979.
At the time of the transfer hearing, the trial court did not possess all of the information about the defendant which subsequently became known, particularly from the psychiatric report. Much of this later-acquired information is relevant to the criteria involved in making the transfer decision. See State v. Speck, 242 N.W.2d 287, 293-94 (Iowa 1976); State v. Halverson, 192 N.W.2d 765, 769 (Iowa 1971). See also Kent v. United States, 383 U.S. 541, 566-67, 86 S.Ct. 1045, 1060, 16 L.Ed.2d 84, 100-01 (1966).
We would have to wear blinders to review the transfer decision only on the basis of the information disclosed in the transfer hearing. It would be unrealistic to do so. Because of the juvenile law's paramount concern for the best interest of the minor and the public, we believe it is more appropriate to vacate the transfer order and direct a new hearing on the transfer issue to be held when or in the event defendant is found competent, without passing on whether the trial court erred in ordering transfer previously. The procedural *711 requirements of present section 232.45 shall apply to such new hearing. In addition, the State and the child shall each have leave to obtain and offer additional information bearing upon the child's mental and emotional condition.
In an additional assignment of error, defense counsel on appeal, who did not represent defendant in the district court, challenges an order of the trial court denying him compensation on the ground the court had lost jurisdiction to appoint counsel for defendant when the notice of appeal was filed before a ruling was made on his application for court appointment. The question of counsel's compensation is collateral to the criminal prosecution and may not be raised in appeal of the conviction. State v. Garrett, 183 N.W.2d 652, 656 (Iowa 1971). The fee issue may be presented in this court by timely petition for certiorari. Furey v. Crawford County, 208 N.W.2d 15, 19 (Iowa 1973).
However, for guidance of the trial court and counsel, we point out that the predicate for denying compensation was incorrect. Like the fee issue, the court appointment issue is collateral to the criminal prosecution. The trial court therefore did not lose jurisdiction over the application for court appointment when the notice of appeal was filed in the criminal case. See Weaver v. Herrick, 258 Iowa 796, 803, 140 N.W.2d 178, 182 (1966); State ex rel. Cheney v. Rowe, 152 Fla. 316, 320-21, 11 So.2d 585, 587 (1943) (holding trial court had jurisdiction to rule on issue of appeal expenses generally); State v. Barnes, 249 Minn. 301, 302-03, 81 N.W.2d 864, 866 (1957) (holding trial court had jurisdiction to rule on issue of transcript expense). We also recognized the collateral issue exception in In re Estate of Tollefsrud, 275 N.W.2d 412, 417-18 (Iowa 1979).
Therefore the trial court had and still has jurisdiction to rule on the application for court appointment. When it rules, its order shall be subject to attack under the rules governing certiorari. If necessary, counsel may then repeat his present contentions.
We cannot let the trial court's comments in the sentencing hearing go unnoticed. Judges possess awesome power to affect people's lives. It is vital that they maintain an even and controlled temperament at all times in exercising this power. Otherwise the quest for justice and the rights of individuals may be subverted.
Judicial responsibility for self-restraint is addressed in ABA Standards, The Function of the Trial Judge § 6.4 (1972). It provides:
The trial judge should be the exemplar of dignity and impartiality. He should exercise restraint over his conduct and utterances. He should suppress his personal predilections, and control his temper and emotions. He should not permit any person in the courtroom to embroil him in conflict, and he should otherwise avoid conduct on his part which tends to demean the proceedings or to undermine his authority in the courtroom. When it becomes necessary during the trial for him to comment upon the conduct of witnesses, spectators, counsel, or others, or upon the testimony, he should do so in a firm, dignified and restrained manner, avoiding repartee, limiting his comments and rulings to what is reasonably required for the orderly progress of the trial, and refraining from unnecessary disparagement of persons or issues.
This standard accurately amplifies the principle of judicial responsibility enunciated in Iowa Code of Judicial Conduct, Canon 3A(3). We believe the standard applies to the trial court's comments about Dr. Mahannah in the present case.
It was inappropriate for the court to criticize Dr. Mahannah on the basis of its interpretation of his report. The record does not support the court's charge that the doctor was purporting to interfere with the judicial prerogative "on a frolic of his own." Courts need all the help they can get in developing sufficient information upon which to make the sensitive and important sentencing decision. They should not arbitrarily reject such help when it appears.
*712 The court intended the examination to be made for different purposes. However, the record does not show that these purposes were communicated to Dr. Mahannah. It is unusual to limit use of a presentence psychiatric report to its possible effect upon proceedings which have already taken place. Furthermore, it was unfair to the defendant for the court to draw substantive conclusions about defendant's mental condition based solely on the doctor's failure to address certain issues in his report.
We do not find it necessary to reach defendant's additional assignments of error.
REVERSED AND REMANDED.
