
148 Ill. App.3d 56 (1986)
499 N.E.2d 119
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
HAROLD GOODWIN, Defendant-Appellant.  THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
TERRY LEE SMITH, Defendant-Appellant.
Nos. 4-86-0138, 4-86-0139 cons.
Illinois Appellate Court  Fourth District.
Opinion filed October 9, 1986.
*57 Daniel D. Yuhas and Diana N. Cherry, both of State Appellate Defender's Office, of Springfield, for appellants.
Jeffrey K. Davison, State's Attorney, of Decatur (Kenneth R. Boyle and Robert J. Biderman, both of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Reversed in X-XX-XXXX; Affirmed in X-XX-XXXX.
JUSTICE SPITZ delivered the opinion of the court:
On January 28, 1986, defendant Goodwin was called as a witness in the prosecution of Ricky Talley. After identifying Talley in court, Goodwin refused to testify. A public defender was appointed to represent Goodwin. The State made an offer of immunity in an attempt to compel Goodwin to testify. The court ordered Goodwin to testify. Goodwin refused to testify, and the court found him in direct contempt for his refusal. (Ill. Rev. Stat. 1985, ch. 38, par. 1-3.) On January 30, 1986, the court held a hearing, and a sentence of 179 days of incarceration was imposed for contempt, to be served consecutively to an eight-year sentence which had been imposed on November 13, 1985, for a felony conviction. Notice of appeal was filed on February 28, 1986.
Defendant Smith had been called as a witness in a December 23, 1985, trial of Ricky Talley, which had ended in a mistrial. Smith had previously been a codefendant in the case, but had entered a guilty plea to one of the pending charges, and had been sentenced to serve a term of five years' imprisonment. Pursuant to the plea agreement, defendant Smith agreed to testify against Talley. In that December 23, 1985, proceeding, Smith acknowledged being present when a home invasion had taken place, but pleaded the fifth amendment in *58 response to further questions. Smith was again called to testify as a witness for the State in the prosecution of Talley on January 28, 1986. During the January 28, 1986, proceeding, the State made an offer of immunity in an attempt to compel Smith to testify. Counsel was appointed to represent Smith, and after consultation, Smith continued to refuse to testify. He was held by the court to be in direct contempt for his refusal to testify (Ill. Rev. Stat. 1985, ch. 38, par. 1-3). On January 31, 1986, a sentencing hearing was held and a sentence of 179 days of incarceration was imposed, to be served consecutively to the sentence already imposed as the result of Smith's guilty plea. Notice of appeal was filed on February 28, 1986.
On appeal, defendants argue that the trial court erred in ordering them to testify, and in holding them in contempt for failing to testify, because the immunity offered by the State and granted by the court did not meet the statutory requirement for immunity.
Section 106-1 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1985, ch. 38, par. 106-1) provides:
"In any investigation before a Grand Jury, or trial in any court, the court on motion of the State may order that any material witness be released from all liability to be prosecuted or punished on account of any testimony or other evidence he may be required to produce."
Section 106-2 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1985, ch. 38, par. 106-2) provides:
"Such order of immunity shall forever be a bar to prosecution against the witness for any offense shown in whole or in part by such testimony or other evidence except for perjury committed in the giving of such testimony."
The Illinois Supreme Court has held that these statutory provisions provide transactional immunity. People ex rel. Cruz v. Fitzgerald (1977), 66 Ill.2d 546, 550, 363 N.E.2d 835, 837.
Regarding Goodwin, the following colloquy ensued at Talley's trial:
"THE COURT: And would you spell out for the record what exactly you are offering in the form of immunity that you are asking the Court to grant the order of immunity?
[ASSISTANT STATE'S ATTORNEY]: We are asking for a grant of immunity for any charge that may arise out of this testimony in any what [sic] whatsoever except for the charge of perjury. We'll not prosecute this defendant for that.
THE COURT: Show that offer by the State and that order shall be granted. The witness, Mr. Goodwin, shall be grant immunity *59 on any questions which the State might ask for which criminal prosecution might be brought except for the charge of perjury."
Following this colloquy, both defendant's attorney and the attorney who was representing Talley informed the court that the State's offer and the court's grant of immunity was use immunity as opposed to transactional immunity, and that there was no statutory authority for such a grant of immunity. The assistant State's Attorney did not respond to these statements of the two defense attorneys.
Regarding Smith, the following colloquy ensued at Talley's trial:
"[DEFENSE ATTORNEY]: Is the Court going to enter an order at this time granting Mr. Smith immunity?
THE COURT: So the record can be clear, what is the offer of immunity that the State is offering to this gentleman at this time?
[ASSISTANT STATE'S ATTORNEY]: It's immunity from any charges that could arise from his testimony except for, of course, the offense of perjury.
[DEFENSE COUNSEL]: Your Honor, I don't think that's actually immunity. That's transactional immunity. I think in Illinois you get immunity from the conduct and not just the testimony.
* * *
THE COURT: The State, apparently, is offering that, and I am going to grant that order of immunity. This means that if they ask you questions and if you give answers, they could not charge you for any criminal violation except it would not include the offense of perjury."
Following this colloquy, defendant Smith's attorney objected to the type of immunity that was offered to his client.
 1 As the supreme court stated in People ex rel. Cruz v. Fitzgerald (1977), 66 Ill.2d 546, 549, 363 N.E.2d 835, 836-37:
"Under use immunity, a witness' compelled testimony or leads derived therefrom may not be used in his prosecution. Under transactional immunity, however, the witness is fully immunized from prosecution for any offenses to which his compelled testimony may relate. See Kastigar v. United States (1972), 406 U.S. 441, 32 L.Ed.2d 212, 92 S.Ct. 1653."
Furthermore, as the court noted in People ex rel. Kunce v. Hogan (1976), 37 Ill. App.3d 673, 678, 346 N.E.2d 456, 462, modified (1977), 67 Ill.2d 55, 364 N.E.2d 50, cert. denied (1978), 434 U.S. 1023, 54 L.Ed.2d 771, 98 S.Ct. 750:

*60 "A grant of immunity under statutory authority must be in strict compliance with the terms of the statute. (People v. Rockola, 339 Ill. 474, 171 N.E. 559 (1930).)"
 2 The immunity offered by the State in these cases covered only prosecutions which might result from incriminating testimony; it did not cover prosecution for offenses to which the testimony might relate, but for which the State might have an independent evidentiary basis. In offering immunity in the instant cases, the State did not invoke the statutory provisions relating to immunity and did not include immunity from prosecution for any offense to which defendants' testimony might relate. The State offered immunity only to charges "arising" from defendants' testimony. This appears to us to be use immunity as opposed to the transactional immunity which is required by statute. Consequently, the orders of the trial court that defendants testify under these grants of immunity were not in compliance with the statutory provisions regarding immunity.
The State argues that even if we find that the offers and grants of immunity did not comply with the statutory provisions regarding immunity, the findings of contempt should still be affirmed because a final adjudication of guilt eliminates the privilege against self-incrimination, and that since the proceedings against defendants for residential burglary were final and complete, they could not assert their fifth amendment rights against self-incrimination in the prosecution of Talley for any events related to this transaction. This argument ignores the possibility that defendants' compelled testimony may have related to matters for which additional charges might be filed against them. The status of the records before us on appeal are such that we do not even know what defendants would have been asked to testify about at trial, nor do we know whether the testimony which the State would have attempted to elicit from defendants would have related exclusively to the incident and the charge for which defendants had already been convicted and sentenced. Consequently, we find no merit to the State's aforementioned argument.
 3 The State raises an additional argument which applies only to defendant Smith. This argument is that Smith validly waived his fifth amendment right against self-incrimination, at least as it pertained to the incident for which Talley was being prosecuted, when he promised to testify against Talley pursuant to a plea agreement, and that since Smith had no legal right to refuse to testify, the court was justified in holding him in contempt despite the fact that the offer and grant of immunity did not comply with the statutory requirements. We agree with this argument. In People v. Fearing (1982), 110 Ill. App.3d 643, *61 644-45, 442 N.E.2d 939, 940, we held that a defendant could validly waive his right to appeal a conviction when he promised not to appeal pursuant to a plea agreement. We believe that the privilege against self-incrimination can likewise be waived pursuant to a plea agreement. (110 Ill. App.3d 643, 442 N.E.2d 939.) In the instant case, the State agreed to drop an additional related charge in return for Smith's promise to testify against Talley. We believe that the circuit court was justified in holding defendant Smith in contempt for refusing to testify against Talley because Smith had no valid legal right to refuse to so testify.
For the reasons stated herein, the finding of contempt and the sentence imposed against defendant Goodwin are hereby reversed; however, the finding of contempt and the sentence imposed upon defendant Smith are hereby affirmed.
No. 4-86-0138 reversed, No. 4-86-0139 affirmed.
GREEN, J., concurs.
PRESIDING JUSTICE McCULLOUGH, dissenting:
The immunity granted was transactional and the defendants were properly found to be in contempt of court.
The colloquy between the State's Attorney and the court as to each of these defendants did not refer specifically to section 106-1 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1985, ch. 38, par. 106-1). It is not necessary, however, to specifically refer to this section of the statute if a clear reading of the record indicates statutory compliance.
As to defendant Goodwin, the State's Attorney asked for a grant of immunity for "any charge that may arise out of this testimony" except for the charge of perjury. The court indicated in response to the offer by the State that the order would be granted and that the witness Goodwin would be granted immunity on any questions which the State might ask for which criminal prosecution might be brought except for the charge of perjury. After defendant Goodwin proceeded to refuse to testify, the court again admonished him that he had been granted immunity to any possible incrimination that might arise.
With respect to defendant Smith, the State's Attorney indicated that it was immunity from "any charges that could arise from his testimony" except for the offense of perjury. The court, in granting Smith's order of immunity, specifically noted that it was granting transactional immunity. The court informed the defendant that the *62 State could ask him any questions and if he gave answers, he could not be charged for any criminal violation except for the charge of perjury.
The colloquy as to each defendant is sufficient under the statute to grant the defendant's transactional immunity. People ex rel. Scott v. Walsh (1980), 89 Ill. App.3d 831, 412 N.E.2d 208.
The majority is correct in stating that a grant of immunity under statutory authority must be in strict compliance with the terms of the statute. (People ex rel. Cruz v. Fitzgerald (1977), 66 Ill.2d 546, 363 N.E.2d 835.) The order in each of these cases granting immunity is broad enough to protect the defendant against all future punishment for any offense which is brought out by the testimony. People v. Walker (1963), 28 Ill.2d 585, 589-90, 192 N.E.2d 819, 822.
While the issue of what constitutes strict compliance with the immunity statute has not been specifically addressed, numerous courts have considered the matter for substantial compliance with Rule 402 for the taking of guilty pleas. (87 Ill.2d R. 402; see People v. Sutherland (1984), 128 Ill. App.3d 415, 470 N.E.2d 1210.) In reviewing alleged compliance with Rule 402, the entire record is to be considered in determining whether or not there was an understanding by the accused of the admonishments. (128 Ill. App.3d 415, 470 N.E.2d 1210.) Similarly, we must look to the entire record to determine whether the immunity granted to Goodwin and Smith was in compliance with section 106 (Ill. Rev. Stat. 1985, ch. 38, par. 106-1). As with Rule 402, if an ordinary person would have understood the court to be in statutory compliance in granting transactional immunity, the essentials have been fulfilled. The statute requires strict, not literal compliance.
In Walsh, the State's request and the court's order specifically cited the statutory authority for immunity. (Order granting immunity "as prayed in petition.") Petitioner requested relief of defendants from all liability to be prosecuted for any charges as enumerated in the statute (Ill. Rev. Stat. 1977, ch. 38, par. 1 et seq.). The reviewing court stated that even though there may have been some ambiguity in the court's order, the immunity granted was full transactional immunity. Similarly, in the case at hand the record is clear. Although the statutory authority was not cited, the immunity was transactional, complied with the statutory requirements, and was a sufficient basis for finding both defendants in contempt. There was no error.
