
723 P.2d 1345 (1986)
The PEOPLE of the State of Colorado, Plaintiff-Appellee,
v.
Robert Russell ROY, Defendant-Appellant.
No. 85SA247.
Supreme Court of Colorado, En Banc.
August 25, 1986.
*1346 Duane Woodard, Atty. Gen., Charles B. Howe, Deputy Atty. Gen., Richard H. Forman, Sol. Gen., Peter Jay Stapp, Asst. Atty. Gen., Denver, for plaintiff-appellee.
Carroll E. Multz, P.C., Carroll E. Multz, Donna A. Salmon, Grand Junction, for defendant-appellant.
VOLLACK, Justice.
Robert Russell Roy, defendant-appellant, appeals his conviction by a jury of the charge of unlawful distribution, sale, or possession of cocaine in violation of section 18-18-105, 8 C.R.S. (1985 Supp.).[1] We affirm.
Roy was charged with violation of this statute along with two other persons who were tried separately. The offense involved the sale at the defendant's garage *1347 of one pound of cocaine to an undercover law enforcement officer. During the investigation, the undercover officer used a body microphone to record certain conversations. Further, one of the named witnesses served as a confidential informant.
The defendant filed a discovery motion seeking a copy of the tape recorded conversations and a motion for disclosure of the confidential informant. The trial court ultimately denied the motion for disclosure of the identity of the confidential informant, concluding such disclosure would endanger that person's life. The trial court noted the confidential informant was listed as a witness and thus was known to the defense. Following an in camera review, the trial court further ruled that certain information contained in the tape recorded conversations would reveal the confidential informant's identity, so edited transcripts of the tapes were furnished to the defendant. The defendant also filed a motion to dismiss, alleging the statute under which he was charged denied him equal protection of the law. The trial court denied that motion.
On appeal, defendant contends the trial court's refusal to let him review the unedited tape recordings denied him a fair trial. Defendant also maintains the trial court erred in denying a motion for mistrial based on alleged improper questions and comments by the prosecutor, and further contends the cumulative effect of the aforementioned errors requires reversal of his conviction. Defendant argues that section 18-18-105, 8 C.R.S. (1985 Supp.), denies an accused person equal protection of the law because it punishes as a class three felony the offenses of attempt and conspiracy which are punished in similar statutes as class four and five felonies. Finally, defendant asserts he was denied his right to a fair and impartial jury when his challenge for cause of one of the jurors was refused by the trial court. We shall address the allegations of error in the order propounded by the defendant-appellant.

I.
Defendant contends the trial court's denial of his request for discovery of the tape recordings and the trial court's ruling allowing a partial transcript of the tapes to be read to the jury denied him a fair trial. He argues the ruling denied his right to effective assistance of counsel because it prevented his attorney from deciding whether any information contained on the tapes would be helpful to the defense. Defendant further argues the ruling denied him the ability to attack the trustworthiness of the tapes based on the presence of inaudible portions.
We note the trial court reviewed the tapes and concluded they would reveal the identity of the confidential informant. Further, the trial court found the deleted portions of the tapes would not assist the defense in the preparation of its case. Based on these considerations, the trial court denied the defendant access to certain portions of the tapes.
Although parts of a tape are inaudible, this does not render the entire recording inadmissible. The decision as to the admissibility of the recording is one that rests in the sound discretion of the trial court. People v. Jeffers, 690 P.2d 194 (Colo.1984); People v. Quintana, 189 Colo. 330, 540 P.2d 1097 (1975); People v. Coca, 40 Colo.App. 440, 580 P.2d 1258 (1978).
Similarly, we note the decision as to whether the identity of a confidential informant should be disclosed to the defense is within the discretion of the trial court. People v. Nunez, 658 P.2d 879 (Colo.1983); People v. Martinez, 658 P.2d 260 (Colo. 1983); People v. Dailey, 639 P.2d 1068 (Colo.1982); People v. Korte, 198 Colo. 474, 602 P.2d 2 (1979). Whether a privilege exists to withhold the identity of a confidential informant from the defense requires a balancing of the public interest in protecting the flow of information regarding violations of the law against the individual's right to prepare his defense. Roviaro v. United States, 353 U.S. 53, 56, 77 S.Ct. 623, 625, 1 L.Ed.2d 639 (1957); People v. McLean, 661 P.2d 1157 (Colo.1983); People *1348 v. Marquez, 190 Colo. 255, 546 P.2d 482 (1976).
Under the circumstances involved here, the trial court determined the information withheld from the defense would not aid in the preparation of its case. Moreover, nondisclosure of the information was necessary to protect the safety, welfare and possibly the life of the confidential informant. We cannot say the trial court abused its discretion in refusing to disclose the identity of the confidential informant since this person was endorsed as a witness. It follows that the portions of the tapes which disclosed this information were properly withheld from the defense.
We conclude the trial court did not err in refusing to allow the defense to have unedited copies of the tapes. Strong deference must be given to the discretionary judgment of the trial court, McLean, 661 P.2d at 1159, and in this case we cannot say the trial court abused its discretion. There is no indication the defense could not adequately prepare its case without disclosure of the edited portions of the tapes, and when balanced against the need to conceal the identity of the confidential informant, the rulings entered by the trial court were proper.

II.
Defendant next maintains the trial court erred in denying his motion for mistrial based on alleged improper questions and conduct by the prosecutor.[2] Defendant contends the prosecutorial misconduct was flagrant and denied him a fair trial. He argues the trial court erred in denying his motion for mistrial because the harm could not be cured by cautionary instructions.
The granting or denial of a motion for mistrial is within the sound discretion of the trial judge because he is in the best position to evaluate the effect of an irregularity on the jury. People v. Gutierrez, 622 P.2d 547 (Colo.1981); People v. Becker, 187 Colo. 344, 531 P.2d 386 (1975). The alleged improper questions and comments must be considered in the context of the testimony as a whole and in light of the evidence. Gutierrez, 622 P.2d at 554. Here, the trial court sustained objections to the offending statements and instructed the jury to disregard them. In the absence of a showing to the contrary, we presume the jury understood and followed the instructions. Id.; People v. Motley, 179 Colo. 77, 498 P.2d 339 (1972). The trial court denied the motion for mistrial by concluding the potential errors had been corrected by admonishments and cautionary instructions.
Following a review of the record, we cannot conclude that the trial court abused its discretion in denying the motion for mistrial. While certain statements by the prosecutor exceeded the boundaries of propriety, we do not feel that the facts in the present case are such as to require reversal. The prosecutor's remarks here in question were inconsequential when viewed against the evidence upon which the jury could have based its determination of the defendant's guilt. In the absence of a showing of actual prejudice to the defendant, we find these contentions to be without merit.


*1349 III.
Defendant next contends the cumulative effect of the foregoing alleged errors require reversal of his conviction. Even though we have concluded the individual allegations do not require reversal, numerous formal irregularities, each of which in itself might be deemed harmless, may in the aggregate show the absence of a fair trial, in which event a reversal is required. Oaks v. People, 150 Colo. 64, 371 P.2d 443 (1962). This is not such a case.
A defendant, although not entitled to a perfect trial, People v. Barker, 180 Colo. 28, 501 P.2d 1041 (1972), has a constitutional right to receive a fair trial. Under the facts of this case, we conclude that the cumulative effect of alleged error did not substantially prejudice the defendant's right to a fair trial. Gould v. People, 167 Colo. 113, 445 P.2d 580 (1968).

IV.
Defendant contends his right to equal protection was violated because the unlawful distribution of a controlled substance statute under which he was convicted, section 18-18-105(1)(a), 8 C.R.S. (1985 Supp.), proscribes the same conduct forbidden by both the criminal attempt statute, section 18-2-101(4), 8 C.R.S. (1978), and the conspiracy statute, section 18-2-201(5), 8 C.R.S. (1978), but carries a greater penalty. Defendant was convicted of a class three felony under section 18-18-105 while the same conduct under section 18-2-101(4) would be a class four felony and under section 18-2-201(5) would be a class five felony. Defendant argues section 18-18-105 is unconstitutional because it imposes a more severe penalty than do the more general criminal attempt and conspiracy statutes, and therefore denies him equal protection of the law.
Equal protection requires that statutory classifications of crimes be based on differences that are real in fact and are reasonably related to the purposes of the legislation. People v. Weller, 679 P.2d 1077 (Colo.1984); People v. Wilhelm, 676 P.2d 702 (Colo.1984). Harsher penalties for crimes committed under different circumstances than those which accompany the commission of other crimes do not violate equal protection guarantees if the classification is rationally based upon differences in the acts or the conduct which is proscribed. People v. Armstrong, 720 P.2d 165 (Colo.1986); People v. Gibson, 623 P.2d 391 (Colo.1981).
There is no violation of equal protection in this case because the defendant's conduct differs from that proscribed by the general criminal attempt or conspiracy statutes. Here, the defendant was engaged in the distribution, sale or dispensing of a controlled substance, and such specific conduct is made unlawful by section 18-18-105(1)(a). A primary rule of statutory construction is that a specific statute prevails over general legislation. People v. Luciano, 662 P.2d 480 (Colo. 1983). It is clearly within the power of the General Assembly to punish the attempt to induce the sale of a controlled substance or conspiring to sell a controlled substance with greater severity than other acts which may constitute criminal attempt or conspiracy. Weller, 679 P.2d at 1082-83. The statute does not violate defendant's right to equal protection of the law.

V.
Finally, defendant argues the trial court committed reversible error in refusing to excuse one of the jurors for cause. The juror indicated during voir dire that he believed he had received information about this case from the news media. His statements indicated that he had confused this case with another one. The trial court denied the defense motion to remove the *1350 juror for cause based upon the juror's representation that he could determine the defendant's guilt or innocence based solely upon the evidence. Defendant maintains the juror lacked impartiality because of his incorrect preconceptions about the case.
It is the duty of the trial court to determine the competence and credibility of a juror. The test is whether the nature and strength of an opinion formed or of the information learned from pretrial publicity are such as necessarily raise the presumption of partiality or of the inability of the potential juror to block out the information from his consideration. People v. McCrary, 190 Colo. 538, 549 P.2d 1320 (1976). This question is essentially one of fact which lies within the sound discretion of the trial court, and its decision will not be overturned on appeal unless an error is manifest. Id.; People v. Abbott, 690 P.2d 1263 (Colo.1984).
Having reviewed the record on this point, we conclude there was no abuse of discretion in the trial court's denial of the defendant's challenge of this juror for cause. The juror displayed no bias against the defendant and stated he would base his decision upon the evidence produced at trial.
Judgment affirmed.
NOTES
[1]  Because the appellant challenges the constitutionality of the statute, this appeal was filed directly in this court pursuant to section 13-4-102(1)(b), 6 C.R.S. (1973).
[2]  During voir dire by defense counsel as to the admissibility of the partial transcript, the prosecutor objected to defense counsel's reference to the edited portions and stated before the jury:

[T]here's already been a court ruling that for the protection of certain persons, that certain portions are not relevant to these proceedings and are not to be publicly disclosed, and I think counsel should not be permitted to go into those areas because of the prior court order.
The defense also asserts it was prosecutorial misconduct to ask a witness, "Did you look for a motorcycle part or any stolen motorcycle auto parts during these searches?" and to ask another witness:
[I]s it policy of C.B.I. or Colorado Bureau of Investigation to allow its agents to make narcotics transactions with underworld dealers or other drug dealers, and when they make these transactions to not reveal their true identity as a police officer?
Defendant also objects to statements made in closing argument.
