
146 Ill. App.3d 843 (1986)
497 N.E.2d 187
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellant,
v.
RONNIE STARKS, Defendant-Appellee.
No. 2-85-0679.
Illinois Appellate Court  Second District.
Opinion filed August 28, 1986.
*844 Neil F. Hartigan, Attorney General, of Springfield (Roma Jones Stewart, Solicitor General, and Mark L. Rotert and Scott Graham, Assistant Attorneys General, all of Chicago, of counsel), for the People.
Robert J. Hauser, of Waukegan, for appellee.
Judgment affirmed.
PRESIDING JUSTICE NASH delivered the opinion of the court:
The State appeals from the dismissal of a charge of armed robbery (Ill. Rev. Stat. 1981, ch. 38, par. 18-2) against defendant, Ronnie Starks. The trial court found the State had failed to fulfill its promise to nol-pros the charge if defendant passed a polygraph examination, and the State contends the court's finding is against the manifest weight of the evidence.
After a jury trial, defendant was convicted of the robbery of the Libertyville Federal Savings and Loan Association in Gurnee, Illinois, on January 15, 1982. Jalena Gutman and Donna Vasey, employees of the loan association, identified defendant as the robber, and a third witness, Stefan Urban, was unable to do so. Defendant did not testify in trial; his uncle, aunt, mother and a friend testified he was in East Bernstadt, Kentucky, during the period December 24 to January 20, where he was subsequently arrested by the Kentucky police. Defendant's sister also testified she had talked to her mother in East Bernstadt on the telephone on January 15 and heard defendant's voice in the background. In rebuttal, Diane Gatham, an acquaintance of defendant's, testified she saw defendant at a gas station in Island Lake, Illinois, on either Sunday, December 27, 1981, or Sunday, January 3, 1982. The jury found the defendant guilty of armed robbery and the trial court entered judgment on the verdict.
In his post-trial motion, defendant identified seven additional alibi witnesses and their affidavits were attached to the motion. The motion further alleged that the defendant had submitted himself to a polygraph examination after a representation by the Lake County State's Attorney's office that the charge would be dismissed if he passed the test. The motion alleged that the defendant did pass the test, but that the State's Attorney's office reneged on its part of the agreement. At a hearing on the motion, defendant testified to the terms of the agreement, but the trial judge refused to allow counsel to introduce further evidence pertaining to the agreement. The court denied defendant's post-trial motion and sentenced him to 11 years' *845 imprisonment.
On appeal to this court, defendant sought to supplement the record with an unsigned affidavit from defendant's trial counsel that there had been a pretrial agreement, and also with a signed affidavit by defendant's present counsel which stated that the trial counsel told him the unsigned affidavit was accurate. This court denied the defendant's motion and, after reviewing the record, concluded there was insufficient evidence of an agreement between the State and defendant, and affirmed the conviction. People v. Starks (1983), 122 Ill. App.3d 228, 239, 460 N.E.2d 1181.
Our supreme court granted leave to appeal and held that if the State had, in fact, made an agreement with the defendant, it was required to abide by it. The court held that defendant had surrendered his fifth amendment privilege against self-incrimination by submitting himself to the polygraph examination and the bargained offer, if made, was supported by consideration necessary to make it binding. (People v. Starks (1985), 106 Ill.2d 441, 451-52, 478 N.E.2d 350.) The court remanded the cause to the circuit court for an evidentiary hearing to determine if there was such an agreement and, if so, to implement it by appropriate orders.
At the resulting evidentiary hearing, attorney Randall Stewart, who was defendant's trial counsel, testified that at defendant's suggestion he proposed the agreement to Assistant State's Attorney John Scully and Scully agreed to dismiss the charge of armed robbery if defendant passed the polygraph examination. At Scully's suggestion, Lieutenant William McCormick, a Libertyville police officer, was chosen to administer the test, and he subsequently informed Stewart and Scully that, in his opinion, defendant was telling the truth when he denied committing the robbery and in stating he was in Kentucky at the time of the offense. Attorney Stewart also testified that Assistant State's Attorney Scully later refused to abide by the agreement because he was being pressured by the robbery victims to prosecute the charge. On cross-examination, Stewart also stated that defendant offered to take the polygraph examination prior to any negotiations in the case.
Assistant State's Attorney Scully testified that during pretrial proceedings, attorney Stewart proposed that defendant be allowed to take a polygraph test. Scully stated that he did not object, but that he did not agree to any conditions should defendant pass the examination. Scully specifically testified he did not promise to nol-pros the charge of armed robbery if defendant passed the examination, but merely told Stewart he would consider the polygraph results with the *846 other evidence in determining how to proceed on the charge. Scully also stated the robbery victims did not attempt to pressure him to go forward on the charge. On cross-examination, Scully testified he subsequently offered to recommend a sentence of 6 to 10 years' imprisonment for defendant if he would plead guilty to the charge of armed robbery, but that offer was not accepted.
Defendant testified at the hearing that Stewart, his trial counsel, informed him prior to trial that Assistant State's Attorney Scully agreed to dismiss the charge of armed robbery, if defendant passed a polygraph examination. Defendant stated he agreed to take the test only because of the agreement to dismiss the charge if he passed it.
Based upon this evidence, the trial court found the agreement claimed by defendant was made and, in accordance with the supreme court's mandate, dismissed the charge of armed robbery. This appeal followed.
The State first contends that the trial court's finding is against the manifest weight of the evidence. The State argues that Assistant State's Attorney Scully's testimony was supported by the fact that the State had a strong case against the defendant as two eyewitnesses had identified him as the robber and another witness had contradicted his alibi. The State argues it is not credible that Scully would have agreed to dismiss the charge if defendant passed a polygraph examination in view of the evidence against him.
 1 It is, however, for the trier of fact to determine the credibility of witnesses and the weight to be given their testimony. (People v. Davis (1984), 130 Ill. App.3d 41, 47-48, 473 N.E.2d 387; People v. Pittman (1984), 126 Ill. App.3d 586, 592, 467 N.E.2d 918, appeal denied (1984), 101 Ill.2d 585; People v. Ziehm (1983), 120 Ill. App.3d 777, 783, 458 N.E.2d 588.) The appellate court will not substitute its judgment for that of the trier of fact where there is evidence which supports the findings. (People v. DeSavieu (1983), 120 Ill. App.3d 420, 426, 458 N.E.2d 504, appeal denied (1984), 99 Ill.2d 531; People v. Rhodes (1983), 119 Ill. App.3d 1002, 1009-10, 457 N.E.2d 1300, appeal denied (1984), 99 Ill.2d 533.) As both defendant and his trial counsel testified to the existence and terms of the agreement, we cannot say the trial court's finding of such an agreement was against the manifest weight of the evidence.
Moreover, it is not implausible that Assistant State's Attorney Scully may have had concerns about the strength of his case against defendant in light of defendant's five alibi witnesses and the failure of one of the witnesses to identify defendant as the robber. As our supreme court noted in its consideration of the first appeal of this case:

*847 "When a prosecutor enters into an agreement of this kind he has doubts about a defendant's guilt. If the defendant fails the polygraph examination, such doubts may be removed and a faltering investigation can be revitalized." (People v. Starks (1985), 106 Ill.2d 441, 451, 478 N.E.2d 350.)
We also note, as did the trial court, that the State's assertion it possessed a strong case against defendant is belied by its offer that defendant pleaded guilty for a recommended sentence of 6 to 10 years' imprisonment when the maximum sentence for the offense of armed robbery is 30 years' imprisonment. Ill. Rev. Stat. 1981, ch. 38, pars. 18-2, 1005-8-1(3).
The State also argues that defense counsel Stewart's testimony that defendant originally proposed to take the polygraph examination was impeached by defendant's testimony that the examination was Stewart's idea and defendant agreed to take the test only in exchange for the State's promise to drop the charge if he passed it. However, defendant's testimony was not necessarily inconsistent with Stewart's, since defendant only testified that Stewart had told him of the agreement with the prosecutor; defendant did not testify he had not originally proposed to take a polygraph examination.
 2 In any event, the alleged inconsistency merely goes to a collateral point and does not impeach Stewart's testimony since both attorney Stewart and defendant testified that the essential terms of the agreement were that the State would dismiss the charge if defendant passed the polygraph examination. The existence of an oral agreement, as well as its terms and conditions, is a question of fact to be determined by the trier of fact. (People v. Boyt (1984), 129 Ill. App.3d 1, 14, 471 N.E.2d 897, aff'd (1985), 109 Ill.2d 403, 488 N.E.2d 264; Howard A. Koop & Associates v. KPK Corp. (1983), 119 Ill. App.3d 391, 400, 457 N.E.2d 66.) Here, the trial court determined the agreement existed as defendant and Stewart stated, and we cannot say this finding was against the manifest weight of the evidence.
 3 The State also argues it is unfair to enforce such pretrial negotiations against it as binding contracts because the State must abide by the agreement while the defendant may renege on it at any time prior to the entry of judgment against him. Although the State does not clarify this argument, in this present case this would presumably mean that the defendant could have refused to submit to the polygraph examination after making the agreement. Recent decisions have drawn a distinction between those situations where the defendant abides by the bargain and those cases where the defendant does not. (People v. Graham (1986), 140 Ill. App.3d 273, 276, 488 N.E.2d *848 617; (People v. Boyt (1984), 129 Ill. App.3d 1, 14, 471 N.E.2d 897, aff'd (1985), 109 Ill.2d 403, 488 N.E.2d 264.) Here, defendant fulfilled his part of the agreement and surrendered his fifth amendment privilege against self-incrimination. The State will, in such cases, be required to fulfill its part of the bargain and we find the trial court correctly dismissed the armed-robbery charge.
Accordingly, the judgment of the circuit court is affirmed.
Affirmed.
SCHNAKE and WOODWARD, JJ., concur.
