delivered the opinion of the court:
Defendant appeals his conviction in a jury trial of the crime of theft of property valued in excess of $150 for which he was sentenced to a term of imprisonment from 3% to 10 years. Two issues are raised in the appeal: (1) Whether tire trial court erred in failing to order a hearing to determine defendant’s competency to stand trial; (2) Whether the court erred in denying defendant’s motion of a mistrial when a prosecution witness testified that defendant had previously been incarcerated. Defendant does not question the sufficiency of the evidence on the issue of his insanity at the time of the offense.
The nature of the first issue requires that we detail the events leading up to the trial. On February 1, 1973, defendant was indicted for theft of a motor van in Marion, Illinois. The court appointed the public defender to represent defendant in the proceedings. On March 7, 1973, 2 weeks prior to trial, defendant requested that the public defender be removed as his attorney and informed the court that he was writing to his family to obtain money to retain an attorney. The court informed defendant that he would be granted a continuance to hire new counsel but that this continuance would “break his term.” Defendant explained that he did not want to delay the trial, but insisted on a new attorney. He stated that he would not accept the public defender as his attorney because he did not have his well-being in mind, and that he felt he would have “two prosecutors.” Defendant further informed the court that he had spent a lot of time in penitentiaries, was a former mental patient, and an escapee from a mental institution.
*452On March 9, defendant informed the court that he had not retained counsel but that a local law firm was sending a representative to interview him. Defendant stated that he would raise an insanity defense at trial. He reiterated that he was a mental patient, an escapee from New York Mental Hospital in Central Islip, Long Island, and had recently been. a patient at Memorial Center, a mental institution in Boulder, Colorado. Defendant added that he “blacked out” at the time of the alleged offense. In response to the court’s questions, the accused stated that he was able to cooperate with counsel and assist in his own defense, and that he understood the charges against him as well as the possible punishment if found guilty of them. The cause was continued for 1 week to enable defendant to hire counsel.
Additional proceedings were held on March 13, 1973. Defendant informed the court that he had not yet retained counsel. When defendant insisted that he did not want a continuance of the trial date, the court ordered the public defender to remain available to assist the accused prior to and during the trial. Defendant objected that the trial would be unfair because the public defender was “unfriendly” and “has done told me that I should be in the penitentiary.”
The State’s attorney requested that a psychiatrist examine defendant to determine his sanity. The court granted the prosecutor’s motion, limiting the purpose of the examination to the question of sanity at the time of the offense. The court reasoned that examination for competency to stand trial was not warranted because defendant had already stated that he understood the charges against him and was able to assist in his defense.
On March 16,1973, after informing the court that “the two psychiatrists in the area who are usually used” would not be available to conduct an examination before trial, the State moved to withdraw its motion for a psychiatric examination. Defendant stated that he did not want a continuance of the trial date. The court granted the State’s motion.
Defendant, who was still not represented by counsel, informed the court that he would rather go to trial without counsel than have a continuance or be represented by the public defender. Over defendant’s objection, the court ordered the public defender to be present at trial to render any assistance defendant might request.
Following the court’s inquiry whether defendant would call any witnesses to testify on his behalf at trial, defendant replied:
“A. Probably, offhand I just don’t know offhand right now. A lot of it will have to be done by phone. Because the State is pushing me so much right at the end of all this. They had three months, Your Honor, and then two weeks ago everything is com*453ing up. They axe telling me I got to do this and I got to do that. You know it’s the State’s fault, not my fault. I am laying in jail for three months, they’re trying to poison my food and everything.”
Defendant again refused the offer of a continuance.
On March 20, 1973, defendant offered the names of two witnesses who would testify on his behalf, and requested that he be allowed to call a psychiatrist to testify at trial the next day. When informed that the psychiatrist would first need to examine him, defendant replied, evidently shouting: “A prisoner is a busy man, Your Honor, when he is doing time. He is a lot more busy, got a lot more pressures on him than a psychiatrist.” The prosecution indicated that they stood ready for trial, but would not oppose a psychiatric examination, if the defendant would accept a continuance to enable an examination to be arranged. The court informed defendant that he had a choice: either go to trial the next day or request a continuance to arrange a psychiatric evaluation. Defendant refused the continuance.
Defendant was tried before a jury beginning March 21, 1973. He appeared pro se. By order of the court the public defender was present at trial to assist the accused. In his opening statement, defendant acknowledged that he had taken the van belonging to James Patterson, but stated that he intended to establish that he was insane at the time of the offense. He made the same admission in his closing argument.
Defendant’s initial contention is that his statements and behavior during the 2 weeks immediately prior to trial raised a bona fide doubt of his competency and the court erred in failing to order a hearing to resolve the competency issue before trial.
A defendant is deprived of his constitutional right to a fair trial if he is tried and sentenced while incompetent. (Pate v. Robinson, 383 U.S. 375, 15 L.Ed.2d 815, 86 S.Ct. 836; People v. Reeves, 412 Ill. 555, 107 N.E.2d 861.) The test to determine competency to stand trial is whether a defendant can understand the nature of the charges against him, and can cooperate with counsel and assist in his own defense. (People v. Geary, 298 Ill. 236, 131 N.E. 652; People v. Thompson, 3 Ill.App.3d 684, 278 N.E.2d 1.) It is not necessary that the defendant or his counsel raise the question of defendant’s competency to stand trial. Whenever it becomes apparent during the proceedings that there is a bona fide doubt of the defendant’s competency, it is the court’s responsibility to stop the proceedings and determine the question before continuing. (People v. Richeson, 24 Ill.2d 182, 181 N.E.2d 170; People v. Burson, 11 Ill.2d 360, 143 N.E.2d 239; Ill. Rev. Stat, ch. 38, par. 1005 — 2—1(c).) The trial court, however, is clothed with discretion to determine whether the cir*454cumstances of a particular case requires such a hearing. People v. Milani, 34 Ill.2d 524, 216 N.E.2d 816, reversed, 386 U.S. 12, 17 L.Ed.2d 702, 87 S.Ct. 874.
In People v. Harris, 47 Ill.2d 106, 265 N.E.2d 644, the defendant produced evidence that he had suffered from epilepsy, that he had been incarcerated on many occasions in the psychiatric ward of the Illinois State Penitentiary, and that he, in the opinion of the Illinois Department of Corrections, needed mental treatment upon conviction and sentencing. Nevertheless, the court held that those factors were “not conclusive of the defendant’s inability to understand the nature of the proceedings against him or to assist in his defense.”
In People v. Richeson, the evidence showed that the defendant walked away from a state mental institution 1 month after commitment. The court held that while the commitment to an institution may show a need for some form of psychiatric treatment, “it does not follow that [a defendant] lacks the mental capacity to stand trial.”
Similarly, the Supreme Court found no bona fide doubt of incompetency where defendant possessed a “sociopathic personality” and suffered from “psychiatric and social disturbances.” (People v. Hammond, 45 Ill.2d 269, 259 N.E.2d 44.) Moreover, it has been held that even prior adjudications of incompetency “do not necessarily raise a bona fide doubt of an accused’s current incompetency [to stand trial].” People v. Thompson.
In the instant case, defendant suggests that the facts that he had recently been a patient in two mental hospitals (and an escapee from one of them) and had “blacked out” at the time of the offense, had complained that the jailers were trying to poison his food, and had shouted in court that a prisoner had more pressure on him than a psychiatrist, taken together, raised a bona fide doubt of defendant’s inability to understand the charges against him.
On March 9, 1973, defendant indicated that he understood the charges against him. On March 13, 1973, defendant told the court, “* # w I am not claiming I am not fit to go to trial now. I want to go.” There was testimony that defendant’s demeanor was essentially normal from witness Patterson, Officer Swafford, and Jailer West.
On March 9, 1973, and again on March 13, defendant indicated he could assist counsel in his defense. On March 9 he gave an oral answer to the State’s request for alibi witnesses. On March 20, defendant indicated he understood trial procedure. On the same date, he responded to the State’s motion for discovery, naming witnesses he planned to call at trial.
At trial, defendant examined and excused prospective jurors on voir *455 dire with acumen quite unusual in a pro se defense. He asked intelligent questions concerning jury instructions. Furthermore defendant cross-examined the State’s witnesses and called two witnesses himself. Moreover, he made timely, astute objections on seven different occasions — at one point calling for a mistrial. Defendant, for a layman, showed himself to be especially adept and adroit in his defense.
It is apparent that defendant not only had the ability to cooperate with counsel in his defense but also had the ability to conduct the defense himself. There exists ample evidence in the record to sustain the trial judge’s conclusion that defendant understood the nature of the charges against him. In so concluding, the judge explained his own previous experience with and understanding of the problems of mental illness. The trial court further stated he had observed the defendant’s behavior on several occasions before and during the trial and indicated that he considered his observation of the defendant in forming a conclusion about defendant’s competency to stand trial. It is apparent to us that the trial court did not abuse its discretion in failing to order a competency examination of the defendant.
Defendant also contends that the court erred in denying his motion for a mistrial when a prosecution witness revealed that the defendant had previously been incarcerated.
After the defense had rested its case the prosecution called as a witness in rebuttal Dean West, jailer for Williamson County. In testifying to defendant’s demeanor when he was brought to the Williamson County jail the following colloquy occurred:
“Q. All right, what was his reaction? How did he react to his surroundings in the jail?
A. He was very belligerent.
Q. How did he make that known?
A. Well, he told me how many different jails he had been in and how they had done it at various places he had been in — .”
At that point defendant objected and called for a mistrial. After argument in chambers on the motion for mistrial the court concluded it should be denied and upon resumption of the trial the jury was admonished to disregard that portion of Mr. West’s testimony.
It is well settled in Illinois that during a criminal prosecution, special care must be taken to insure that the defendant is not prejudiced by introduction of evidence of prior unrelated offenses. (People v. Williams, 72 Ill.App.2d 96, 218 N.E.2d 771; People v. Harges, 87 Ill.App.2d 376, 231 N.E.2d 650.) Where a defendant takes the stand to testify in his own defense, he cannot be questioned about prior arrests and convictions; he can only be impeached by the introduction of an authenticated *456copy of the record of his conviction for those felonies that fall within the criteria set forth in People v. Montgomery, 47 Ill.2d 510, 268 N.E.2d 695. Where the defendant chooses not to testify, the introduction of evidence of prior offenses is even more restricted since the introduction of such evidence can no longer be justified as impeachment of the defendant’s credibility. Where the accused does not testify, the main objection is that evidence of prior offenses prejudices the juiy by conveying to them the impression that defendant had criminal tendencies and is likely to commit a crime such as the one for which he is being tried. People v. Polenik, 407 Ill. 337, 95 N.E.2d 414; People v. Williams.
We note that the testimony in question did not relate to the conviction of crimes, but merely to defendant having previously been in jail. Admittedly, from such evidence it is readily inferred that defendant did in fact have some sort of prior criminal record. Defendant asserts that the error was compounded when the court gave People’s Instruction No. 13, IPI — 24.01:
“A person is insane and not criminally responsible for his conduct if at the time of the conduct, as a result of mental disease or mental defect, he lacks substantial capacity either to appreciate the criminality of his conduct or to conform his conduct to the requirements of the law.
Abnormality manifested only by repeated criminal, or otherwise anti-social conduct, is not mental disease or mental defect.”
However, the trial court properly instructed the jury to disregard the objectionable testimony and there was no further reference thereto upon the part of the prosecution but the defendant commented during his final argument that he had previously been in jail when he stated: “There’s been some little things, a man mentioned some little things and now I’ll mention it because I didn’t think they care about whether he’s been in jail — yes, I’ve been in jail.”
Disposition of this issue is controlled by tire recent supreme court cases of People v. Wilson, 51 Ill.2d 302, 281 N.E.2d 626, and People v. Dukett, 56 Ill.2d 432, 308 N.E.2d 590. In Wilson defendant did not take the stand, but his companion and codefendant testified for the prosecution. In response to questions concerning conversations with the defendant and another codefendant, this witness responded that there had been some conversation about the defendant having a record in another state and having been in the penitentiary. Defense counsel objected and moved for a mistrial. After conference with counsel, the trial judge had the court reporter read back to the jury the question which elicited the objectionable response and instructed the jury specifically to disregard the answer that had been given to that question. No further references *457to any past criminal record of the defendant were thereafter made during the trial. The court held that this testimony of unrelated crimes was improper and constituted error, but not reversible error, the trial court having properly instructed the jury to disregard the answer. Also see People v. Bourlet, 52 Ill.App.2d 437, 202 N.E.2d 46, in which it was held that it was not error to give the same instruction as People’s No. 13.
It does not appear that the jury’s verdict was influenced by the improper testimony. Defendant freely and repeatedly admitted that he took the truck in question, but placed reliance upon his alleged insanity at the time of the taking. From the evidence presented the jury chose to believe that defendant was not insane, but rather that the defendant’s act was criminal conduct. We believe the verdict is supported by the record and that it was not engendered by the reference to defendant’s prior incarcerations. In his voir dire examination of jurors, defendant made it known that the sole issue in the case was his insanity at the time the truck was taken. The statement of the issue was repeated in his final argument. Prior incarceration is far afield from the issue of insanity, and we believe tire jury’s verdict was responsive to the issues and evidence and was free from any taint or prejudice alleged to have arisen from the one remark regarding defendant’s presence in other jails. The presentation of the objectionable testimony by witness West was not deliberate upon the part of the prosecution — the answer of the witness was unresponsive to the question. The court admonished the jury to disregard the objectionable testimony and only the defendant referred to such testimony thereafter. We conclude that although the remark by witness West was error, it was not reversible error and upon the record here must be termed harmless beyond a reasonable doubt. Harrington v. California, 395 U.S. 250, 23 L.Ed.2d 284, 89 S.Ct. 1726; People v. Stephens, 12 Ill.App.3d 215, 297 N.E.2d 224.
For the foregoing reasons the judgment of the trial court will be affirmed.
KARNS, J., concurs.