delivered the opinion of the court:
Defendant, Maurice Pittman, appeals his conviction and sentence for unlawful delivery of a controlled substance entered by the circuit court of Madison County after a trial by jury. On appeal defendant contends (1) he was not proved guilty beyond a reasonble doubt, (2) the prosecution *840improperly attempted to inform the jury of defendant’s prior criminal record, and (3) a consecutive sentence was improperly imposed.
The case against defendant was based almost entirely on the testimony of police informant Robert Gubin. Gubin admitted that he had previously been convicted for narcotics violations several times and that he had also been convicted as an accessory after the fact to manslaughter for tampering with evidence during a homicide investigation. Gubin also admitted that narcotics charges were pending against him in Madison County at the time he was helping police in the hope he would receive leniency on those charges.
Gubin stated that he first met defendant when they were both confined in the county jail. However, Gubin stated that it was his girlfriend who informed him of defendant’s drug-dealing activities and that it was on the basis of her information that he called police. According to Gubin, he contacted two officers assigned to the Metropolitan Enforcement Group of Southwestern Illinois (MEGSI), and the MEGSI officers met him in the parking lot of an East Alton restaurant. He informed the officers that defendant was selling drugs in an apartment at 828 Alby Street in Alton, Illinois, and the officers then drove him to that location. Once they were parked across the street from that address, the officers subjected him to a strip-search in their van and gave him three $20 bills, which he took across the street to purchase heroin. Gubin then went across the street and knocked on the front door of the building. After being let in the building, he knocked on the first door to his right and was let into an apartment, the only one he entered in the building. Once he entered the apartment, he handed defendant the three $20 bills and received an aluminum packet in return. He then left the apartment and returned to the police officers, giving them the aluminum foil packet, which contained a white powdered substance. A forensic scientist testified that he had tested the substance and identified it as heroin.
The two MEGSI officers were able to corroborate a portion of Gubin’s testimony. They stated that they met Gubin at the restaurant parking lot and then drove him to the address he gave them. The officers confirmed that they strip-searched Gubin and gave him the three $20 bills which he took across the street. Although the officers saw him enter the apartment building, they could not observe which apartment he entered. The officers stated that Gubin was in the building for nine minutes and that when he returned he gave them the packet containing heroin. The officers admitted that they did not strip-search Gubin after the transaction even though ordinary MEGSI practice would require they do so.
Defendant attempted to impeach Gubin with the testimony of Rqbert Belcher. Belcher stated that he had met Gubin when they were both inmates at the county jail. At that time Gubin expressed an intention *841to set someone up in order to gain leniency for himself. During his testimony Gubin had admitted having spoken with Belcher but denied having expressed a desire to set someone up.
The defense also offered several alibi witnesses, but they were not consistent with each other in their testimony. Reggie Taylor testified that on the evening in question he was in the apartment Gubin claimed to have visited and that neither Gubin nor defendant had been in the apartment. Taylor stated that the apartment belonged to defendant’s brother-in-law, Henry Smith, and that on that evening the only other people in the apartment were Ben Jones, Smith and his nephews. Taylor was certain of the date because Smith’s wife had just died. Taylor further testified that the only time he had seen defendant on the date in question was at defendant’s home around noon. During cross-examination Taylor denied having any close ties to defendant or his wife, but, over objection, he did admit that he had testified on defendant’s behalf on two previous occasions.
Henry Smith also testified on behalf of defendant, but his testimony contradicted Taylor’s in several respects. Smith stated that his wife had died over a month prior to the date in question, and the only reason he remembered that day was because Gubin had come to his apartment looking for his (Smith’s) sister and defendant’s wife, Shirley Pittman. According to Smith, his sister left with Gubin.
The defense also offered the testimony of defendant’s brother, Benjamin Jones, who stated that he was with defendant in Edwardsville on the date in question. According to Jones he met defendant in Edwardsville at approximately 11:30 a.m. After lunch they met with an assistant public defender for about an hour and a half in an attempt to help his nephew. Jones stated that after that he and defendant met with an associate judge and then visited with an attorney in East Alton until approximately 4:30 p.m. Both the assistant public defender and the associate judge subsequently testified that they remembered meeting with defendant, but neither could remember the exact date on which their meetings had occurred.
Jones further testified that after their meetings had ended he and defendant went to their mother’s home for dinner. Jones related that after dropping defendant off at their mother’s residence, he drove over to Smith’s apartment and picked up defendant’s wife, who accompanied him back to their mother’s home for dinner. Jones testified that they all remained at the mother’s residence until approximately 7 p.m.
Following this testimony the jury returned a verdict of guilty.
Defendant first contends that the uncorroborated testimony of Robert Gubin was insufficient to prove him guilty beyond a reasonable doubt. Defendant cites Gubin’s several narcotics convictions and his motive of *842gaining leniency for himself. While this undoubtedly bears upon the witness’ credibility, the mere fact that Gubin had a narcotics record and that he was aiding police to benefit himself does not render his testimony unworthy of belief. (People v. Barney (1959), 15 Ill. 2d 503, 155 N.E.2d 615.) Instead, the test is whether, considering all of the surrounding circumstances, the informant may still be believed. (People v. Norman (1963), 28 Ill. 2d 77, 190 N.E.2d 819.) While it is true that Gubin’s testimony was not corroborated in every detail, it has long been recognized that corroboration is not required, since by its very nature a narcotics transaction is secret and only the informant will generally witness the actual exchange. (People v. Perkins (1962), 26 Ill. 2d 230, 186 N.E.2d 330.) Corroboration can exist in varying forms and degrees. Certainly this case is not similar to People v. Bazemore (1962), 25 Ill. 2d 74, 182 N.E.2d 649, where police failed to keep the addict-informant under surveillance as he went to the area of the alleged drug sale. Here, the officers watched Gubin as he entered the apartment building, stayed for only a short time and returned with heroin he did not previously have. And even if the supposed impeachment testimony of Robert Belcher is accepted as true, it only shows that Gubin intended to gain leniency by exposing some one else in a drug deal. Drug purchases by informants are by their very nature set up to one degree or another, which is not synonymous with a frame-up, as defendant is apparently contending.
In this case, at least a portion of Gubin’s testimony was corroborated by other evidence. In view of this fact, and in view of the contradictory testimony offered by the defense, there was a firm basis for the jury to believe Gubin and to find defendant guilty beyond a reasonable doubt.
Defendant’s next contention is that the prosecution improperly attempted to inform the jury of other criminal conduct by defendant. During opening argument the prosecutor stated that he would show that Gubin had received both heroin and cannabis from defendant. Although defense counsel’s objection to the mention of cannabis was sustained, it was sustained only after a conference was had outside the presence of the jury. During the course of that conference defense counsel conceded that although he had finally decided not to raise the defense of entrapment, he had previously told the prosecutor he “would not waive the defense of entrapment.” Since an entrapment defense raises an issue as to the origin of the purpose to sell contraband, evidence of other sales is admissible to rebut the defense. (People v. Tipton (1980), 78 Ill. 2d 477, 401 N.E.2d 528; People v. Price (1974), 17 Ill. App. 3d 911, 309 N.E.2d 56.) In view of defense counsel’s admission, the prosecutor’s statement cannot be viewed as error since it was nothing more than a good faith effort to rebut the asserted defense of entrapment. Only after defense counsel made it clear that entrapment would not become an issue was it proper to sustain the *843objection, and at that point and thereafter the prosecutor properly refrained from any further reference to cannabis.
Defendant also contends that the prosecutor improperly brought his prior criminal record to the jury’s attention when defense witness Reggie Taylor was asked whether he had testified on defendant’s behalf on two previous occasions. Unlike the cases cited by defendant, here there was no explicit reference to any prior crimes, nor was there any attempt to identify the prior litigation as criminal. It was merely an impeachment attempt aimed at showing Taylor’s bias and was directed at Taylor’s statement that he had no close ties to either defendant or his wife. Since no specific reference to prior criminal activity was made, the case is similar to People v. Guyton (1972), 53 Ill. 2d 114, 290 N.E.2d 209. In Guyton, the following exchange took place during examination of a police officer:
“Q. You were the one that noted [defendant’s] speech impediment?
A. Yes, it’s always in the crime pattern, too, that — ,
THE COURT: That is not the question.
Q. There was a picture taken of [defendant] wasn’t there?
A. Yes sir.”
The court reasoned that since no specific reference was made to prior crimes and since no resulting prejudice was shown, no reversible error had occurred. A similar result is warranted here.
Defendant’s final contention is that the trial court improperly made his six-year sentence consecutive to that imposed in another case. Section 5 — 8—4(b) of the Code of Corrections (Ill. Rev. Stat. 1979, ch. 38, par. 1005 — 8—4(h)) provides,
“The court shall not impose a consecutive sentence unless, having regard to the nature and circumstances of the offense and the history and character of the defendant, it is of the opinion that such a term is required to protect the public from further criminal conduct by the defendant, the basis for which the court shall set forth in the record.”
Defendant contends that this statute was not complied with since the judge did not explicitly state that defendant was being given a consecutive sentence because such a term is required to protect the public. Defendant cites People v. Green (1980), 83 Ill. App. 3d 982, 404 N.E.2d 930, which was remanded for resentencing because of the court’s failure to comply with section 5 — 8—4(b). Defendant cites the Green court’s statement that “[t]he language of the statute is explicit: the basis for the trial court’s imposition of consecutive sentences shall be set forth. An indirect acknowledgment of the statute’s purposes is insufficient.” (83 Ill. App. 3d 982, 988, 404 N.E.2d 930, 934.) While an isolated reading of this *844passage might support defendant’s assertion, we are persuaded that such an interpretation is not a fair reading of Green. The Green court emphasized that the reason for its ruling was that the “trial judge in the instant case failed to adequately specify his reasons for the imposition of a consecutive sentence.” (83 Ill. App. 3d 982, 988, 404 N.E.2d 930, 934.) On the same page the Green court went on to state that “[o]ne of the primary purposes of the provision * ° * is to enable reviewing courts to determine just what went into the sentencing decision * * The record in the instant case does not satisfy this purpose # *
In this case, immediately prior to sentencing the trial court admonished defendant as to the danger he posed because of repeated convictions for “serious drugs.” The court went on to state, “We’re not going to allow pushers and dealers in serious drugs to survive in this county, without facing the penalties — the stiff penalties * * On the basis of these statements we believe that the trial court complied with the dual purposes of section 5 — 8—4(b). The trial court here did set forth in the record its reasons for imposing consecutive sentences, and the reviewing court has been provided a basis for determining what considerations went into the sentencing decision. When the trial court’s reasoning for imposing consecutive sentences is undeniably set forth in the record, a formalistic recital that a consecutive term is needed to protect the public is not required.
For the reasons stated we affirm.
Affirmed.
KASSERMAN, P. J., concurs.