
75 Ill. App.3d 949 (1979)
394 N.E.2d 710
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
EDWARD EVANS, JR., et al., Defendants.  (ARNOLD CARLISLE, Defendant-Appellant.)
No. 15324.
Illinois Appellate Court  Fourth District.
Opinion filed August 27, 1979.
*950 Alan D. Bourey, of Carpel & Bourey, Ltd., of Decatur, for appellant.
Patrick M. Walsh, State's Attorney, of Decatur (Marc D. Towler and Jane F. Bularzik, both of State's Attorneys Appellate Service Commission, of counsel), for the People.
Judgment affirmed.
Mr. JUSTICE MILLS delivered the opinion of the court:
Armed robbery  aggravated battery  armed violence.
Guilty  all eight counts.
We affirm.
*951 Carlisle was found guilty by a jury of four counts of armed robbery, three counts of aggravated battery, and one count of armed violence. He was sentenced to concurrent terms of 18 years' imprisonment on each of the armed robbery and armed violence convictions and 5 years' imprisonment on each of the aggravated battery convictions, all to run consecutive to a 12-year sentence for armed robbery in Sangamon County. On appeal, he argues error (1) in the trial court's denial of his motion to dismiss under the 120-day rule; (2) in denial of his motion for substitution of judges; (3) in the court's refusal of his tendered instruction regarding the lesser included offense of robbery; and (4) in the ruling on his objection to the State's closing argument.
The events leading to the defendant's conviction occurred at the home of Randy Sinclair in Decatur, Illinois, on April 20, 1978. The evidence shows that the defendant and three accomplices entered the home of Sinclair and inquired as to the whereabouts of Sinclair's brother, Rodney. Apparently, the defendant and his cohorts desired to purchase drugs and believed Sinclair's brother was involved in the sale of such substances. Unfortunately for Sinclair and his guests, Rodney was not present and phone calls placed by Randy to locate him were unsuccessful. The defendant and his companions then proceeded to tie up and rob Sinclair and his three guests. Three of the individuals were also physically assaulted during this incident. At his trial, the defendant did not contend that the crimes had not occurred but instead relied on the defense of involuntary drugged condition which was rejected by the jury.
I. Denial of defendant's motion to dismiss based upon an alleged violation of the 120-day rule. (Ill. Rev. Stat. 1977, ch. 38, par. 103-5.) The record indicates that on April 21, 1978, the defendant was arrested in Sangamon County for an offense committed there. He was charged by information in Macon County on April 21 and 25, 1978, and on July 13, 1978, a grand jury returned indictments charging the defendant with the same offenses involved in the informations. On August 22, 1978, he was convicted in Sangamon County and sentenced to 12 years' imprisonment on September 20, 1978. Prior to the sentencing hearing in Sangamon County, the defendant, on September 11, 1978, filed a motion to dismiss the Macon County charges because he argued that the State had failed to comply with the 120-day statute. The defendant argues the court erred in denying this motion because the recited facts show that he was in custody for the alleged offenses and not tried within the 120-day period mandated by the statute. We reject this argument.
 1, 2 There is no dispute that the defendant was in custody for more than 120 days. But it must also be shown that he has been in custody in connection with the subsequently prosecuted charges to fall within the protections afforded by the statute. (People v. Parsons (1977), 48 Ill. App.3d 618, *952 363 N.E.2d 396.) Here, the defendant was in custody and being prosecuted in Sangamon County rather than in Macon County. Where a defendant is in custody awaiting trial in one county and a charge is pending against him in another, he is not deemed to be in custody for the latter offense until the proceedings against him in the first county are terminated and he is held in custody for the second county. People v. Clark (1968), 104 Ill. App.2d 12, 244 N.E.2d 842.
In the case at bench, unlike Clark, the defendant was brought to Macon County pursuant to a writ of habeas corpus ad prosequendum on June 15, 1978. This was prior to the termination of the proceedings against him in Sangamon County. He also appeared in Macon County pursuant to such writs on subsequent occasions and after each such appearance was returned to Sangamon County. The defendant attempts to distinguish Clark by arguing that once Macon County initiated these proceedings by obtaining writs of habeas corpus ad prosequendum it had a duty to have the case tried within 120 days. Even if this argument was accepted, it would offer defendant little solace. The Macon County trial was held on September 25 and 26, 1978  well within 120 days of his first appearance in Macon County on June 15, 1978.
 3 Moreover, the defendant cannot avail himself of the 120-day rule if the delay is occasioned by him. The standard to be applied in determining whether the delay is properly attributed to the defendant is whether he causes or contributes to the delay, and this question can only be answered by carefully examining the facts of each case. (People v. Poteat (1973), 12 Ill. App.3d 1068, 299 N.E.2d 565.) Accountability for the delay rests in the judgment of the trial court and its decision will not be disturbed unless it is clearly shown that the court abused its discretion. (People v. Jordan (1976), 44 Ill. App.3d 101, 357 N.E.2d 869.) In his application for discharge, it is incumbent upon the defendant to show that he was in custody on the instant cause in excess of the statutory period and the record must affirmatively establish this fact. People v. Jones (1965), 33 Ill.2d 357, 211 N.E.2d 261, cert. denied (1966), 385 U.S. 854, 17 L.Ed.2d 81, 87 S.Ct. 99.
Here, the defendant was taken into custody in Sangamon County on April 21, 1978. On June 15, 1978, he first appeared in Macon County pursuant to a writ of habeas corpus ad prosequendum. On this date the defendant indicated to the court that he had retained private counsel and a preliminary hearing was set for July 6, 1978. The July 6 hearing was continued until July 13 but the record does not reflect who requested this continuance. On July 13 the grand jury returned indictments in this case and the defendant was present in Macon County on July 14, 1978, also pursuant to a writ of habeas corpus ad prosequendum. Again defendant stated that he would attempt to retain counsel of his choice and that it *953 would take ten days to two weeks to accomplish this. A plea of not guilty was then entered and the court stated that since the defendant did not have counsel, the court assumed that he would not be ready for an August jury trial. Defendant responded that this was correct. The cause was then set for a September 18 jury trial and the matter of counsel allotted for a hearing on July 31, 1978. At the July 31 hearing, the defendant  for the first time  requested that counsel be appointed for him. The court immediately appointed the public defender, who later that day notified the court of a conflict of interest in representing this defendant. The same day the court appointed private counsel to represent the defendant. But on August 4, 1978, this attorney filed a motion to withdraw as counsel based upon a conflict of interest and the court then appointed the attorney who represented the defendant at trial.
 4 Where a continuance is granted upon the request of the defendant for the purpose of retaining counsel, the consequent delay in the proceedings is chargeable to the defendant and the running of the 120-day statute is tolled. (People v. Miller (1974), 21 Ill. App.3d 762, 316 N.E.2d 269.) It is clear from this record that much of the delay was caused by the defendant's failure to retain counsel after twice informing the court that he would do so. The trial court was correct in charging this delay to the defendant and denying his request for dismissal under the 120-day rule.
II. The court denied defendant's motion for substitution of judges which was filed September 15, 1978. This motion cited section 114-5 of the Code of Criminal Procedure of 1963 but cited no subsection. (Ill. Rev. Stat. 1977, ch. 38, par. 114-5.) It stated that the trial of the defendant was set for September 25, 1978, before Judge Rodney A. Scott and that the defendant believed that he could not receive a fair trial before Judge Scott. While the defendant had signed the motion, it was neither verified nor accompanied by an affidavit to support its allegations.
A motion for substitution of judge must comply with the statutory requirements enumerated in section 114-5 which provides, in relevant part:
"(a) Within 10 days after a cause involving only one defendant has been placed on the trial call of a judge the defendant may move the court in writing for a substitution of judge or any 2 judges on the ground that such judge or judges are so prejudiced against him that he cannot receive a fair trial. Upon the filing of such a motion the court shall proceed no further in the cause but shall transfer it to another court or judge not named in the motion.
* * *
(c) In addition to the provisions of subsections (a) and (b) of this Section any defendant may move at any time for substitution of judge for cause, supported by affidavit. Upon the filing of such *954 motion the court shall conduct a hearing and determine the merits of the motion."
Initially, defendant urges that his motion was filed pursuant to subsection (a) of section 114-5. Alternatively, he takes the position that if his motion was not sufficient to require automatic substitution under subsection (a) it was sufficient to come within the provisions of subsection (c).
In order to avail himself of the automatic substitution mandated by subsection (a) the motion must have been filed within 10 days after the cause had been placed on the trial call of the judge. To show that he has met this requirement, the defendant asks us to take judicial notice of an administrative order of the circuit court in Macon County. This undated order places primary responsibility for the handling of felony cases in Macon County in Judge Scott with Judge Donald W. Morthland assisting him. Consequently, defendant argues that his motion was within the 10-day period because he did not know which judge would be assigned to his case.
To support this position, the defendant has cited us to the case of People v. Flowers (1977), 47 Ill. App.3d 809, 365 N.E.2d 506. We find the situation faced by the defendant in Flowers readily distinguishable from the case at bench. In Flowers, the matter had been set on the misdemeanor jury trial call in the courtroom normally occupied by Judge Moran who had granted three continuances on the defendant's motion. When the case was again called, Judge Sulski was substituting for Judge Moran and, over defendant's objection, he granted a continuance on the State's motion. After this continuance, the case was again called in Judge Moran's courtroom but on that date Judge Zafiratos was sitting in that room and the case was referred to the chief judge who reassigned it instanter to Judge Sulski's courtroom. When the case was called by Judge Sulski, the defendant presented a written motion pursuant to section 114-5(a) naming Judge Sulski and one other judge. This motion was denied as not within the 10-day period and the defendant was convicted of the offense of unlawful use of weapons. On appeal, he argued that the trial court improperly denied his motion for substitution of judges and the appellate court agreed. When Judge Sulski had granted the State's motion for a continuance, the defendant no longer had cause to believe that he would be the trial judge when the case again came up for trial and thus had no reason to move for substitution within the 10-day statutory period. He could not know that his case would not remain in Judge Moran's courtroom or that it would be reassigned and placed on Judge Sulski's trial call. Only when that occurred did he know who would preside at his trial. Consequently, his motion was timely filed and should have been granted.
*955  5 Here, however, defendant had appeared before Judge Scott on several occasions and his own exhibit shows that Judge Scott had primary responsibility for felony cases in Macon County. Defendant's argument would be persuasive if, after several appearances before Judge Scott, the case had suddenly been placed on the trial call of Judge Morthland. That did not occur. Defendant's motion came only three days before his trial was scheduled to begin and two days after he had announced ready for trial. Furthermore, the motion was not filed until after Judge Scott had denied defendant's motion for dismissal on September 12, 1978. A motion for substitution of judges is to be made at the earliest practical moment and before the judge has ruled adversely to the defendant on substantial issues in the case. (People v. Lewis (1977), 52 Ill. App.3d 477, 367 N.E.2d 710.) Defendant's argument also fails to consider the fact that subsection (a) allows the defendant to move for substitution of one judge, or any two judges, that he considers prejudiced against him. Assuming that the motion was filed pursuant to subsection (a), it was not timely and was properly denied by the trial court.
 6 Defendant's argument concerning subsection (c) of section 114-5 also fails. The motion was not supported by affidavit as required by section 114-5(c) nor was it verified, as was the motion in People v. Ethridge (1966), 78 Ill. App.2d 299, 223 N.E.2d 437. Defendant argues that the trial court was still obligated to hear evidence concerning the allegations of prejudice. However, the duty imposed on the trial judge by this section is to afford an opportunity to present evidence, not to insure that it is presented. (People v. Kadlec (1974), 21 Ill. App.3d 289, 313 N.E.2d 522.) At the hearing on this motion, the record reflects that although no evidence was heard, none was offered. The burden of presenting such evidence rests not on the court but on the defendant. (People v. Breitweiser (1976), 38 Ill. App.3d 1066, 349 N.E.2d 454.) Thus, no error occurred when the trial court denied the defendant's motion for substitution of judges.
III. The trial court denied defendant's tendered instruction regarding the lesser included offense of robbery. No gun was offered as evidence at the defendant's trial and when the victims testified they were unable to positively identify a gun in a photograph produced by the State as being one of the actual gun used by the defendant. The defendant argues that this testimony would have justified a jury finding that he was guilty of only the offense of robbery. We disagree.
 7 An instruction on the lesser included offense is to be given when there is evidence in the record which, if believed by the jury, would reduce the crime charged to that of a lesser included offense. (People v. Joyner (1972), 50 Ill.2d 302, 278 N.E.2d 756.) While the witnesses were not able to positively identify the photograph presented by the State, their *956 unrefuted testimony was that the defendant was armed. We are aware of no authority which would require the State to produce the weapon used by a defendant in a situation such as this and, indeed, such a rule would be illogical. There was no evidence in this case that the defendant was unarmed and an instruction on the lesser included offense would not have been justified.
IV. Finally, the trial court overruled the defendant's objection to the State's closing argument. According to the defendant, this denied him the very defense he was attempting to establish  that of involuntary drugged condition. The portion of the State's argument to which the defendant refers involved a statement by the prosecutor that under the theory of accountability the defendant was responsible if he "in some way" aids or abets in the commission of the crime. The defendant objected to the use of the words "some way" by the prosecutor. The court overruled this objection and stated that the jury would be instructed by the court and that the statement of counsel was substantially correct.
(We note that toward the end of his closing argument the prosecutor also suggested various facts which supported the State's position that the defendant possessed the necessary mental capacity to be convicted of the crimes charged. And, during the closing argument of defense counsel, it was argued that defendant was not accountable for his conduct because he lacked the necessary mental state.)
 8 In the absence of a clear abuse of discretion, the trial court's ruling on remarks made during closing argument will not be disturbed. (People v. Brown (1974), 20 Ill. App.3d 1064, 313 N.E.2d 488.) Unless a prosecutor's comments have prejudiced the defendant as a material factor influencing his conviction, they are deemed to be harmless error. (People v. Driver (1978), 62 Ill. App.3d 847, 379 N.E.2d 840.) Here, the jury was properly instructed as to the elements of the offenses and given instructions which defined accountability and involuntary drugged condition. Both the defense and the State included statements in their closing arguments which informed the jury of the requirement that the defendant must have possessed the necessary mental capabilities at the time of the offense. They both argued how the evidence proved or disproved the fact that the defendant possessed this mental capacity. We are of the opinion that any error that may have occurred during the closing argument in this context was harmless beyond a reasonable doubt.
Affirmed.
REARDON, P.J., and GREEN, J., concur.
