
293 N.W.2d 8 (1980)
STATE of Iowa, Appellee,
v.
Everett Roy LYON, Appellant.
No. 63403.
Supreme Court of Iowa.
June 18, 1980.
*9 Barry S. Kaplan, Marshalltown, and Martha Shepard, Des Moines, for appellant.
Thomas J. Miller, Atty. Gen., and John P. Messina, Asst. Atty. Gen., for appellee.
Considered by REYNOLDSON, C. J., and LeGRAND, REES, HARRIS, and ALLBEE, JJ.
LeGRAND, Justice.
Defendant, Everett Roy Lyon, was accused of multiple crimes committed in Polk and Marshall Counties, including one charge of first degree murder. The cases were consolidated for trial. Defendant waived a jury, and trial to the court resulted in a determination of guilt on all counts. He was sentenced to serve a term of life on the murder charge and concurrent indeterminate sentences on the other three convictions. Defendant appeals on the sole issue he was not competent to stand trial. We affirm.
Two statutes are controlling. We set them out in full:
Section 812.3. Mental incompetency of accused. 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.
Section 812.4. Cessation of criminal prosecution. If, upon hearing conducted by the court, the accused is found to be incapacitated in the manner described in section 812.3, no further proceedings shall be taken under the complaint or indictment until the accused's capacity is restored, and, if his or her release will endanger the public peace or safety, the court must order him or her committed to the custody of the department of social services.
We recently had occasion to consider these statutes in State v. Kempf, 282 N.W.2d 704, 706-07 (Iowa 1979). Unlike its predecessor statute (§ 783.1, The Code 1977), the present law does not mandate a jury trial on this issue. Competency under sections 812.3 and 812.4 is determined by a hearing before the court.
In Kempf we said:
We conclude that the present statue requires a hearing on the issues 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 legal one. Trial court discretion is not involved.
. . . Because constitutional safeguards are implicated, we make our own evaluation of the totality of the circumstances. [Citation omitted]. This means we review the record de novo. [Citation omitted].
282 N.W.2d at 706-07.
The statute establishes a level of competency which demands that a defendant appreciates the charge, understands the proceedings, and can assist effectively in the defense. This is the same test we applied in our decisions prior to the enactment of section 812.3, The Code. See State v. Kempf, 282 N.W.2d at 706; Hickey v. District Court, 174 N.W.2d 406, 410 (Iowa 1970).
*10 With these principles in mind, we turn to the present case. We need not review the bizarre facts leading up to this prosecution because we agree with the trial court and with the defendant that a question of competency reasonably appeared. We must determine here only if the provisions of sections 812.3 and 812.4 were complied with.
There was nothing to alert the court to the competency question until Ben Sorenson was called as a witness. One of the charges against defendant was that he had attempted to murder Mr. Sorenson. When Mr. Sorenson testified, defendant became agitated. He seemed remote, he stared vacantly into space, he was unresponsive to his counsel. He did, however, communicate to them his feeling that this could not be Mr. Sorenson testifying because he had already killed him. Counsel immediately brought this to the attention of the court. The court stopped proceedings, and the following took place:
MR. KAPLAN: May it please the Court, your Honor, during Mr. Sorenson's testimony, Miss Masterpole [co-counsel] and myself noticed that Mr. Lyon's demeanor had changed from his previous demeanor during the other witnesses. He, upon my questioning him and upon Miss Masterpole's questioning him, was not responsive, appeared to be pretty much in a different world as far as what was happening. He was not able to communicate with Miss Masterpole and myself. He was not able to truly appreciate what Mr. Sorenson was saying, and it's my opinion at this point that he was not able to appreciate the proceedings going on at this time.
He mentioned that he heard laughter and made some other comments which lead me to believe that the Court should inquire regarding the competency pursuant to Chapter 812 of the Supplement.
THE COURT: Very well. Section 812.3 of the Code provides if at any stage of a criminal proceeding that 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 should be suspended and a hearing had upon that question.
At this point, with the record made up to now, the Court was not aware of any problems. . . . We have the advantage of the Court being without a jury so it's not as cumbersome . . Any answers that he gives will not be admissible in the trial on the merits should he be held competent or incompetent.
Mr. Lyon, I want to ask you some questions and if you don't understand them, will you ask me to repeat them or explain them?
The court then asked defendant a number of questions concerning the charges against him and the proceedings then underway. He answered them all in a way to allay any fears concerning his mental condition until the Sorenson matter was touched upon. Then this occurred:
THE COURT: Very well. Mr. Lyon, are you aware that you're accused of having attempted to murder Ben Sorenson?
MR. LYON: No.
THE COURT: You're not aware of that?
MR. LYON: Cause he's dead.
THE COURT: Ben Sorenson is dead?
THE COURT: Very well. Mr. Lyon, are you aware that you're accused of having attempted to murder Ben Sorenson?
MR. LYON: No.
THE COURT: You're not aware of that?
MR. LYON: Cause he's dead.
THE COURT: Ben Sorenson is dead?
MR. LYON: Yeah.
THE COURT: Do you know when Mr. Sorenson died?
MR. LYON: Yeah. When I killed him.
THE COURT: You killed him? Have you been present throughout the trial yesterday and today, Mr. Lyon?
MR. LYON: Well, yeah. Yeah.

*11 THE COURT: Referring to yesterday, did you hear the witnesses testify?
MR. LYON: Yeah.
THE COURT: Were you able to visit with your counsel about the witnesseswhat the witnesses said and tell them what happened or whether you agreed or disagreed as to the witnesses?
MR. LYON: Yes, I was.
THE COURT: Up to today, up 'til Mr. Sorenson appeared, were youcould you follow the witnesses and understand what they were saying?
MR. LYON: Yes.
THE COURT: Now, are you aware, not as opposed to whether Mr. Sorenson is alive or not, but are you aware that you're accused of having attempted to kill Mr. Sorenson?
MR. LYON: I didn't think that's what it was.
THE COURT: Are you feeling the impression that you're here because you killed him?
MR. LYON: Yes.
THE COURT: Now, you've heard Sorenson testify a little while ago; didn't you?
MR. LYON: Not really.
THE COURT: When you say not really, was it you weren't following him or this was just unreal to you or what's the problem?
MR. LYON: He wasn't here. There is no way.
THE COURT: All right. So your problem is as to Sorenson only as of now; is that right? Up to this point, you followed the other witnesses and were able to confer with your counsel; is that correct?
MR. LYON: Yes.
THE COURT: But Sorenson you have some doubt about; is that correct?
MR. LYON: Yeah, I guess you could say that.
THE COURT: The other charges you have no problem with at this point?
MR. LYON: No, I haven't had any problems.
At this point the State withdrew Mr. Sorenson, and the trial continued. The trial court suggested the possibility of severing the Sorenson charge, but no decision was reached. The trial court also offered counsel the opportunity to have defendant examined by a psychiatrist. Counsel did not think this necessary.
At the end of the proceedings for that day, trial court again raised the competency issue. The court noted that defendant appeared to be responding properly and intelligently as the trial progressed. Defendant's counsel agreed and the following exchange then took place:
THE COURT: What is your thought about either having a psychiatrist or other examination or having the defendant checked at this time? Do you have any intention of doing that? . .
MR. KAPLAN: I think, based upon our observations of Mr. Lyon at this point and based upon our discussions, I don't think we need that at this point.
Later Ben Sorenson was recalled and completed his testimony. The trial court again inquired into defendant's reaction to this witness. This then occurred:
MR. KAPLAN: Mr. Lyon appeared to appreciate what the witness was saying. He appeared to understand what was going on, unlike the other day. He did make some notes on a page of his legal pad which does not reflect what I just said, however, and I think Mr. Lyon wants to proceed ahead, but I'm not able to say if he was able to really appreciate what was going on with Mr. Sorenson or not.
The trial court then addressed defendant, who stated he understood the charges against him, including the attempted murder of Ben Sorenson. He also assured the court he could follow the testimony and discuss it with his attorneys.
It is apparent from the foregoing that defendant was a troubled person concerning only the Sorenson incident. If this were *12 the entire record, there would be a serious question about his competency under section 812.3. However, the trial court also had the benefit of two psychiatrists, one a witness for the State, the other for defendant.
Dr. Hector Cavalin was defendant's psychiatrist. When he had concluded his principal testimony, the trial court recessed the trial and questioned Dr. Cavalin about the defendant's competency. Dr. Cavalin testified that defendant understood the nature of the charges against him and expressed the opinion he was competent to stand trial.
The following day the competency question was again addressed by the court when the State's psychiatrist, Dr. Paul Loeffelholz, testified. He, too, said defendant was competent to stand trial.
It is fundamental that a defendant may not be tried or convicted while he is incompetent to stand trial or to assist in his own defense. To deprive him of this right is to deprive him of due process and a fair trial. Drope v. Missouri, 420 U.S. 162, 172, 95 S.Ct. 896, 904, 43 L.Ed.2d 103, 113 (1975); Pate v. Robinson, 383 U.S. 375, 385, 86 S.Ct. 836, 842, 15 L.Ed.2d 815, 822 (1966).
The procedure required by sections 812.3 and 812.4 of our code is substantially like that approved in Pate. Our task is to determine whether what the court did conforms to what the statute demands.
This problem arises here only because we now permit a defendant to waive trial by jury in all criminal cases. Rule 16, R.Crim.P. If there is a jury, the main trial must cease and a separate hearing must be held outside the presence of the jury to avoid prejudice. However, the trial judge was sitting in the present case both as the fact finder on the question of guilt or innocence and as the court designated by section 812.4 to determine competence. As we understand defendant's objection, it goes more to the form of the hearing than to the substance. The statute sets no procedural guidelines and each case must rest on its own facts in determining if defendant has been accorded his constitutional due process rights. Under this record we hold he was.
From the moment the question first arose, the trial court was diligent and persistent in seeking out the facts concerning defendant's mental condition. The trial court personally interrogated defendant at least twice. He obtained opinions from the two psychiatrists who appeared as witnesses. Several times he offered defendant an opportunity for psychiatric examination. It is quite apparent the trial court was aware of the problem and was careful to protect defendant's rights. Even though the matter was discussed by court and counsel several times, at no time did defense counsel object to the procedure being followed. It is, of course, the court's responsibility to make proper inquiry under the statute; but we may consider counsel's failure to object in deciding if the procedure followed was proper.
We have considered circumstances such as defendant's intelligence (State v. Kempf, 282 N.W.2d at 709-10) and counsel's failure to ask for a competency hearing (State v. Stoddard, 180 N.W.2d 448 (Iowa 1970)). In the present case, defendant has above normal intelligence; and although his attorneys raised the competency issue, they made no objection to the procedure followed, even though afforded every opportunity to do so.
For the future, we recommend that trial courts completely separate competency hearings from trial proceedings. It makes a better record on appeal if the trial is recessed while the competency hearing is held to its conclusion. Trial can then be resumed if defendant is found to be competent. However, the procedure followed here did not deny defendant his constitutional or statutory rights. A review of the whole record fails to persuade us that defendant was not competent to stand trial. He did, indeed, suffer from the aberration concerning Mr. Sorenson. However, as the trial went on, it became apparent this was less fixed than at first supposed. After careful observation and interrogation, the trial court concluded defendant was competent to stand trial. Two psychiatrists confirmed *13 that opinion. We believe it was the right one.
The judgment is affirmed.
AFFIRMED.
