
8 Ill. App.3d 2 (1972)
288 N.E.2d 672
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
DANIEL L. KING, Defendant-Appellant.
No. 55754.
Illinois Appellate Court  First District.
October 6, 1972.
*3 Gerald W. Getty, Public Defender, of Chicago, (George L. Lincoln and James J. Doherty, Assistant Public Defenders, of counsel,) for appellant.
Edward V. Hanrahan, State's Attorney, of Chicago, (Elmer C. Kissane and William K. Hedrick, Assistant State's Attorneys, of counsel,) for the People.
Reversed in part and reversed and remanded in part.
Mr. JUSTICE DRUCKER delivered the opinion of the court:
Daniel L. King was indicted for attempted murder on March 23, 1968, and was arraigned on April 4, 1968. Later, on October 4, 1968, he was indicted for unlawful use of weapons. (Ill. Rev. Stat. 1967, ch. 38, par. 24-1(a)(4).) In a joint trial by jury on all charges he was found guilty of all charges and sentenced to 10 to 20 years for attempted murder, a concurrent term of five to 10 years for the unlawful use of weapons within five years after release from a penitentiary (see Ill. Rev. Stat. 1967, ch. 24-1(b)), and one year in the County Jail for unlawful use of weapons.[1] During the trial he was found guilty of contempt of court and sentenced to six months in the County Jail to be served following his discharge from the penitentiary.
Defendant urges many trial errors but the main issues are (1) the improper denial of defendant's motion to dismiss the indictment (No. 68-3502) charging the unlawful use of weapons; (2) the resulting prejudicial error in allowing evidence of defendant's prior criminal record on the trial of attempted murder (Indictment No. 68-1151); and (3) the improper finding of direct contempt.
On March 4, 1968, Officer Gary Cohen observed the defendant seated in a restaurant at 5605 North Broadway. Believing the defendant to be *4 a felon, Officer Cohen asked him to step outside. The defendant stepped outside and was directed by Cohen to walk to a police car parked 20 feet away and place his hands on top of the car. The defendant placed his hands on the top of the car momentarily, turned and started to run and then, when he was eight or ten feet from Cohen, turned and fired one shot from a .38 caliber revolver which missed Cohen.
Cohen pursued the defendant into an alley and they exchanged shots as the defendant fled. Cohen was joined in the pursuit by Detective James Sullivan who was off duty at the time. Sullivan never saw the defendant. The defendant's jacket and wallet were recovered at the scene. The shooting took place at 4:15 in the afternoon.
According to defendant, Cohen questioned him in the restaurant and during the questioning took his coat. Cohen also threatened to kill him as they left the restaurant. When the defendant was getting into the police car outside the restaurant, he turned and fled. Cohen pursued him, firing his pistol. The defendant claims he was not armed at this time. Following his successful escape the defendant obtained a gun from a friend because he was afraid the police were trying to kill him.
At 7:15 that evening James Frick, an off duty policeman, recognized the defendant as the assailant in the shooting that afternoon from a radio broadcast earlier in the day. He called for assistance and then he and several other officers entered the store in which he had seen the defendant. The officers, noticing a large bulge in the right trouser pocket in which the defendant had his hand, grabbed the defendant and seized his right arm. The defendant's trouser pocket contained a loaded .38 caliber revolver.
During trial the court found the defendant in contempt of court for his refusal, on cross-examination by the State, to name the person who supplied him with the gun.

Opinion
Defendant contends that the unlawful use of weapons charge should have been dismissed under Ill. Rev. Stat. 1967, ch. 38, par. 103-5(a), which provides that a person in custody shall be tried within 120 days from the day he was taken into custody unless delay is occasioned by defendant and other exceptions not pertinent in this case.
Indictment No. 68-1151 charging attempted murder was returned on March 23, 1968, at which time defendant had been in custody since March 4, 1968. Indictment No. 68-3502 charging unlawful use of weapons was returned by the Grand Jury on October 4, 1968. Defendant was still in custody at that time. Defendant was in custody for more than 120 days and it is undisputed that he did not occasion any delay in bringing to trial the unlawful weapons charge.
*5 Ill. Rev. Stat. 1967, ch. 38, par. 3-3, requires, and the State admitted at trial, that both offenses defendant was charged with had to be prosecuted in a single prosecution. Sub-paragraph (b) thereof states:
"If the several offenses are known to the proper prosecuting officer at the time of commencing the prosecution and are within the jurisdiction of a single court, they must be prosecuted in a single prosecution, except as provided in Subsection (c), if they are based on the same act."
Defendant contends that when he was indicted for attempted murder, the State had to know that he had a concealed weapon at the time of the offense and that defendant had been released from a penitentiary within five years.
 1, 2 Included in the record are a Chicago Police Department report listing all prior convictions of the defendant, including the Federal charge which is the basis of the weapons charge, dated March 5, 1968, and a similar F.B.I. report dated March 14, 1968. We further note that the only witnesses to appear before the Grand Jury on each indictment were Gary Cohen and James Frick, both members of the Chicago Police Department. We further note that even if the State hadn't known of the enhanced penalty because of the defendant's prior conviction, it did know at the time of the arrest all facts necessary to bring an unlawful use of weapons charge against the defendant. Based on this information we are convinced that a "proper prosecuting officer" was aware of the defendant's prior conviction when the first indictment was returned. The State's contention that there was "[n]o evidence in the record * * * that there was any ulterior motive on the part of the Cook County officials in failing to formally charge the defendant" is irrelevant. The law requires only that the offenses were known and that the State failed to prosecute within 120 days. The above facts demonstrate that the offenses were "known" as the term is used in Ill. Rev. Stat. 1967, ch. 38, par. 3-3, supra, and the State failed to prosecute within 120 days. Any continuances occasioned by the defense on the attempt murder charge have no bearing on the State's failure to prosecute the weapons charge within 120 days. (People v. Williams, 2 Ill. App.3d 993, 278 N.E.2d 408.) The State in its brief admits that:
"The unlawful use of weapon charge stems directly from the shooting, where the evidence indicated defendant pulled from his crotch area a .38 caliber pistol and opened fire at a police officer. The later seizure of that same gun at defendant's subsequent arrest did not create a charge, but rather obtained the evidence for the crime already committed. They were not * * * `two separate transactions.'"
*6 We therefore hold that the State failed to comply with the 120-day statute (Ill. Rev. Stat. 1967, ch. 38, par. 103-5(a)), and the judgments and sentences on the unlawful use of weapons charges (Indictment No. 68-3502) are reversed.
On the attempted murder charge defendant urges that the admission of defendant's prior criminal record as part of the State's evidence was prejudicial error. If the weapons charge had been dismissed, as it should have been, the criminal record of defendant would have been inadmissible during the presentation by the State of its evidence.
 3 The State contends that the defendant's prior conviction is admissible as part of its case even if the weapon charge was not timely because it showed defendant's motive for shooting of Officer Cohen. The State in offering the defendant's record into evidence stated, "It is an element of proof." It is clear that the State offered and the court admitted the defendant's record as part of the State's proof of the weapon charge. Since we have reversed the weapon charge, we are compelled to hold that the defendant's prior criminal record should not have been admitted as part of the State's case. Undoubtedly its admission prejudiced the jury. The State cannot now claim that the prior conviction could have been admitted to show motive. The record discloses it was admitted to prove a crime of which the defendant should have been discharged, not motive. We therefore reverse the defendant's conviction for attempted murder and remand it for a new trial (Indictment No. 68-1151).
 4, 5 Defendant also contends that the finding of direct contempt for refusal to answer certain questions was erroneous because the contempt order itself did not indicate under what circumstances defendant took the witness stand and did not specify the questions asked of defendant. The record shows that defendant was called as a witness in his own behalf and that defendant stipulated that the questions and answers relative to his refusal to answer were those that appear in the record of the trial. The questions asked of defendant (over objection of defense counsel) were to the effect of where and from whom did he get the gun. Defendant's contention that in determining the propriety of the contempt order we are bound by its "four corners" is without merit. We may consider the record as well as the order. In re Dunagan, 80 Ill. App.2d 117, 225 N.E.2d 119; People v. Baxter, 50 Ill.2d 286, 278 N.E.2d 777.
 6 The questions defendant refused to answer clearly went to an immaterial issue and were therefore irrelevant. Defendant's objection to the question should have been sustained by the court. We thus believe the real question for review is whether a defendant who objects to *7 answering a clearly irrelevant question but is nevertheless required by the court to answer it may properly be held in contempt for persisting in his refusal to answer. We believe he may not. In 98 C.J.S. Witnesses § 430, at page 240, it is stated:
"A witness is not required to answer a question relating to a matter immaterial to the issues, irrelevant, involving a collateral matter, or a matter beyond the jurisdiction of the court."
See Du Bois v. Gibbons, 2 Ill.2d 392, 418, 419, 118 N.E.2d 295; 8 Wigmore, Evidence § 2192, at 72 (McNaughton rev. 1964).
We believe our position was well stated by the court in In re Judson, 3 Blatch, 148, 150 (Fed. Case No. 7,563):
"Before the Court will adjudge a witness to be in contempt or commit him therefor, it will require more than proof of the fact that he declines to respond to a question. It will require whether the question is relevant and material to the case or hearing, (1 Greenl. Ev., § 319); and also whether the witness is legally exempt from answering it. No contumacy can be imputed to him, until these points are determined. The law gives no color to the practice, which not unfrequently intrudes upon judicial proceedings, of besetting a witness with impertinent inquiries, calculated to pry into his private affairs, or into his own character or that of other persons, or to subject him to personal liability, when the inquires are not shown to have a legitimate bearing upon the cause on trial; and it is guarded in coercing answers to questions when their materiality is not clearly manifest."
The judgments and sentences pursuant to the conviction under Indictment No. 68-3502 are reversed; the judgment and sentence pursuant to the conviction under Indictment No. 68-1151 is reversed and the cause remanded for a new trial and the contempt order is reversed.
Reversed in part and reversed and remanded in part.
LORENZ, P.J., and ENGLISH, J., concur.
NOTES
[1]  The State concedes in its brief that this one year sentence was improper and should be vacated.
