
63 P.3d 875 (2003)
2003 WY 20
Kilen Patrick DYSTHE, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 01-125.
Supreme Court of Wyoming.
February 19, 2003.
*878 Kenneth M. Koski, Public Defender; Donna D. Domonkos, Appellate Counsel; and Tina N. Kerin, Senior Assistant Appellate Counsel, Representing Appellant.
Hoke MacMillan, Attorney General; Paul S. Rehurek, Deputy Attorney General; D. Michael Pauling, Senior Assistant Attorney General; T. Alan Elrod, Assistant Attorney General; Theodore E. Lauer, Director, Prosecution Assistance Program; and Hugh J. Linnehan and Meri Ramsey, Interns, Representing Appellee.
Before HILL, C.J., and GOLDEN, LEHMAN, KITE, and VOIGT, JJ.
VOIGT, Justice.
[¶ 1] Kilen Patrick Dysthe (Dysthe) appeals his conviction for delivery of a controlled substance, in violation of Wyo. Stat. Ann. § 35-7-1031(a)(ii) (LexisNexis 2001), a felony. The district court sentenced Dysthe to the custody of the Department of Corrections for a period of eighteen to thirty-six months. We reverse.

ISSUES
[¶ 2] The issues presented on appeal are:
I. Did the trial court err in excluding two of [Dysthe's] named witnesses, thereby denying him his right to a fair trial and his right to compulsory process?
II. Did the trial court err in excluding evidence relating to the State's witness, Eric Stone?
III. Did the prosecutor commit misconduct in closing argument?

FACTS
[¶ 3] Dysthe was charged with selling cocaine to Daniel Luke Jacquot (Jacquot) in June 2000. Eric Stone (Stone), a mutual friend, testified that he processed the cocaine into a smokeable form and Jacquot testified that Dysthe, Jacquot, Stone, and Jacquot's brother, John, smoked the cocaine.[1] Jacquot was a participant in drug court, and Jacquot's urine tested positive for cocaine the day after the group allegedly smoked the cocaine. Jacquot testified that he was booked into jail after telling drug court personnel that he had used cocaine. Jacquot told a Division of Criminal Investigation (DCI) agent that Dysthe had sold him the cocaine. An Information charged Dysthe with one count of delivery of a controlled substance, in violation of Wyo. Stat. Ann. § 35-7-1031(a)(ii).
[¶ 4] The district court entered a scheduling order on September 8, 2000, that required the parties to list witnesses and exhibits by November 13, 2000. On November 9, 2000, Dysthe listed his mother and Stone as witnesses. The State filed a notice of additional witnesses on December 5, 2000, listing a former drug court employee, Bob Green, as a witness. The defense filed its notice of additional witnesses on January 25, 2001, naming Ray Olson and Jodie Bear, drug court employees, as witnesses. These witnesses were to testify about Jacquot's conduct in drug court, specifically that he conspired with other drug court participants to deliver hallucinogenic mushrooms. The next day, the State listed Honorable J. John Sampson as a witness, to counter any defense accusations concerning Jacquot's conduct in drug court. The district court held a hearing on the day of trial regarding the various notices and motions related to the additional witnesses. The district court prohibited either party from calling additional witnesses because it was not notified of these witnesses by the court's November 13th deadline. The matter proceeded to trial and a jury found Dysthe guilty. This appeal followed.

DISCUSSION

WITNESS EXCLUSION
[¶ 5] Dysthe first argues that the district court erred in precluding the testimony of two defense witnesses, Ray Olson and *879 Jodie Bear, Sheridan drug court personnel, thereby denying him his right to present a defense. Dysthe presents the issue as one of constitutional magnitude, implicating the right to present a defense as guaranteed by the Sixth and Fourteenth Amendments to the United States Constitution,[2] and Wyo. Const. art. 1, § 10.[3] A violation of the compulsory process clause of the Sixth Amendment occurs when a defendant is arbitrarily deprived of testimony that would have been relevant, material, and vital to his defense. United States v. Valenzuela-Bernal, 458 U.S. 858, 867, 102 S.Ct. 3440, 73 L.Ed.2d 1193 (1982). In Taylor v. Illinois, 484 U.S. 400, 407-09, 108 S.Ct. 646, 98 L.Ed.2d 798 (1988), a case involving the violation of a pre-trial discovery order, the United States Supreme Court held that the compulsory process clause is not merely a guarantee that the accused shall have the power to subpoena witnesses, but confers on the accused the fundamental right to present witnesses in his own defense. Taylor further held, however, that although a trial court may not ignore a defendant's fundamental right to present witness testimony in his favor, the mere invocation of that right cannot automatically and invariably outweigh countervailing public interests. Id. at 410-16, 108 S.Ct. 646. The factors to be weighed in the balance include, but are not limited to the "integrity of the adversary process, which depends both on the presentation of reliable evidence and the rejection of unreliable evidence, the interest in the fair and efficient administration of justice, and the potential prejudice to the truth-determining function of the trial process...." Id. at 414-15, 108 S.Ct. 646.
[¶ 6] In Lawson v. State, 994 P.2d 943, 946-47 (Wyo.2000), we adopted the Taylor factors and held that the exclusion of alibi testimony was an abuse of discretion where the district court failed to consider any factor other than the defendant's failure to comply with the filing date requirement of W.R.Cr.P. 12.1(a)[4] and failed to consider the factors articulated in Taylor.[5] We have defined judicial discretion as "`a composite of many things, among which are conclusions drawn from objective criteria; it means a sound judgment exercised with regard to what is right under the circumstances and without doing so arbitrarily or capriciously.'" Vaughn v. State, 962 P.2d 149, 151 (Wyo. 1998) (quoting Byerly v. Madsen, 41 Wash.App. 495, 704 P.2d 1236, 1238 (1985)).
[¶ 7] In the instant case, the district court required the parties to name their witnesses by November 13, 2000. On January 25, 2001, defense counsel named the two Sheridan drug court personnel as additional witnesses. The State objected to the two witnesses, but also listed Judge Sampson for potential rebuttal. The district court held a hearing on the matter just prior to jury selection, inquired as to the purpose of the proposed testimony, and following counsels' arguments, ruled as follows:
THE COURT: All right. Well, counsel, this is the way the Court is going to handle this. Both of you are precluded from using Bob Green, Ray Olson, Jody [sic] Bear, Judge Sampson in your cases in chief. I'm not going to get into the merits of the arguments. But it will be the ruling of the Court that the late filing precludes their use in the case in chief. If it turns out that, you know, one of you thinks that they are necessary for some sort of proper rebuttal, I'll consider it at that time.
(Emphasis added.)
[¶ 8] This ruling barred Dysthe from calling the drug court witnesses in his case-in-chief, *880 but it left the door open to their use in rebuttal. Despite this ruling, when defense counsel tried to impeach the credibility of Jacquot, a witness for the State, with questions that would have made such rebuttal appropriate, the district court sustained the State's objection:
[DEFENSE COUNSEL:] ... [Jacquot], you just testified that you haven't made any deals with the prosecutor, right?
[JACQUOT:] Correct.
[DEFENSE COUNSEL:] Isn't it true that you'vethat just within the last month you were in some fairly serious trouble?
[PROSECUTOR:] Objection, Your Honor.
THE COURT: Trouble?
[DEFENSE COUNSEL:] Trouble in Drug Court.
[PROSECUTOR:] It's improper specific acts. Improper under 404, improper under 401, improper under 403, improper under 608 and 609.
THE COURT: Counsel, if you want to approach the bench.
...
THE COURT: A couple of questions that you've attempted have incited a narrative response. They haven't been specific enough to limit the testimony to those items required by the rule, and they really haven't been specific enough for me to properly rule on an objection, so if you want to give me an offer of proof as to where you're headed outside the hearing of the jury, maybe I can rule on [the prosecutor's] objection.
[DEFENSE COUNSEL:] I want to ask him if he has been, if he has been threatened with prosecution by Drug Court personnel; and isn't it true that when you or your father objected to the prosecutor's office, the problems were taken care of.
And I don't care if [the prosecutor] did anything or not; this kid thinks that that happened. I want to know his perception of that.
THE COURT: As we talked about before we started the trial, I don't think it's improper for you to ask if someone threatened him withspecifically with respect to his testimony in this case. But both of you are talking generally about drug use and Drug Court. It may have to do with other cases involving other people. It may be other times. I don't have any idea where you're at. If you make it very specific to testimony in this case, you may inquire. If not, I'm going to sustain the objections.
[DEFENSE COUNSEL:] I can't even get intoI'm not allowed to even ask a question. I get objections all the time.
THE COURT: Did you hear what I just said, though, about making itwell, see you apparently want to inquire as to whether or not he received any pressure that affects his testimony in this case. That's okay. But
[PROSECUTOR:] Your Honor, I'm sorry to interrupt the Court. He already testified that he did not from my office. If he's going to talk about the otherabout these alleged things with Drug Court, which had nothing to do with this case, there's going to be an objection before [defense counsel] is expecting to get the question out, because I don't think it's proper to be in front of the jury and to have all of the innuendos about Drug Court.
THE COURT: That's why it's got to be specific. That's why it's got to be specific about the testimony that he is offering in this case. He has said I don't have any reason to lie; [the prosecutor's] office didn't make a deal with me. Okay.
And so if you say, for example, "Has anyone threatened you regarding your testimony in this case," that's probably appropriate. But these vague generalities about Drug Court and other people using drugs and testifying at other times and all that, it's too confusing; and I'm going to sustain objections to that. So it's up to you.
[¶ 9] The drug court witnesses were essential to Dysthe's defense in order to attempt to discredit Jacquot, but he was precluded from presenting this evidence in his case-in-chief because of an arbitrary date set by the district court, and he was precluded *881 from presenting it in rebuttal by the district court's decision not to allow counsel to pursue that line of questioning. Because there was no physical evidence, the State's case was based solely on the credibility of its witnesses, and its primary witness had potential credibility issues. The district court did not consider any Taylor factors in enforcing its pre-trial deadline. We conclude that the evidence of Jacquot's drug court troubles and the possibility of favorable treatment was relevant, material, and vital to the defense in order to attack Jacquot's credibility. The district court abused its discretion in excluding Dysthe's witnesses.[6]
[¶ 10] W.R.A.P. 9.04 states that "[a]ny error, defect, irregularity or variance which does not affect substantial rights shall be disregarded by the reviewing court." W.R.Cr.P. 52(a) and W.R.E. 103(a) contain similar provisions. The test for harmless error stated in the reverse is as follows:
"`An error is harmful if there is a reasonable possibility that the verdict might have been more favorable to the defendant if the error had never occurred. To demonstrate harmful error, the defendant must show prejudice under "circumstances which manifest inherent unfairness and injustice or conduct which offends the public sense of fair play."' Johnson v. State, 790 P.2d 231, 232 (Wyo.1990)."
Lancaster v. State, 2002 WY 45, ¶ 28, 43 P.3d 80, 93 (Wyo.2002) (quoting Skinner v. State, 2001 WY 102, ¶ 25, 33 P.3d 758, 767 (Wyo. 2001), cert. denied, 535 U.S. 994, 122 S.Ct. 1554, 152 L.Ed.2d 477 (2002)).
"Before a federal constitutional error can be held harmless, the court must be able to declare its belief that the error was harmless beyond a reasonable doubt. In determining whether reversible error occurred, we ask if the defendant's absence created any reasonable possibility of prejudice. The State must show that an error can pass muster under this standard."
Skinner, 2001 WY 102, ¶ 23, 33 P.3d at 766 (quoting Seeley v. State, 959 P.2d 170, 178 (Wyo.1998)).
[¶ 11] Nothing in the record indicates that Dysthe ever admitted to selling, using, or even discussing cocaine with any of the State's witnesses. When we consider that no drugs were retrieved or placed into evidence at trial, leaving the State's case totally dependent upon the credibility of its witnesses, we cannot conclude that the error in excluding this testimony was harmless beyond a reasonable doubt.

EXCLUSION OF EVIDENCE
[¶ 12] Dysthe next argues that the district court erred when it excluded evidence relating to the State's witness, Stone. The State did not present any drugs into evidence. To prove that the controlled substance Dysthe allegedly sold to Jacquot was in fact cocaine, the State called Stone, an admitted drug user, to testify. Stone testified that he considered himself an "expert" on "certain aspects" of cocaine and that the substance he cooked on the day in question was "consistent with [his] familiarity of cocaine...."
[¶ 13] To show that the substance in question may not have been cocaine, but could have been methamphetamine, defense counsel attempted to ask Stone about his experience with methamphetamine:
[DEFENSE COUNSEL:] Don't they [methamphetamine and cocaine] have the same effect?
[STONE:] I'm not sure.
[DEFENSE COUNSEL:] So I take it you haven't done any methamphetamine?

*882 [STONE:] I don't think that's relevant.
[DEFENSE COUNSEL:] Well, you get to answer the question.
[STONE:] Excuse me?
[DEFENSE COUNSEL:] I take it you haven't done methamphetamine?
[STONE:] That's not relevant.
[DEFENSE COUNSEL:] Would you answer the question? Have you done methamphetamine to be able to distinguish the two?
[STONE:] No, I will not answer that question.
[DEFENSE COUNSEL:] You have to answer that question.
THE COURT: You know, counsel, this exceeds the scope of the direct and is into a totally different area.
[¶ 14] The district court then allowed counsel to approach the bench and make an offer of proof out of the hearing of the jury panel. The district court stated that the trial was about cocaine, and Stone had testified that cocaine and methamphetamine were different. Defense counsel pointed out the earlier testimony of a DCI agent who testified that cocaine and methamphetamine have virtually similar effects. From the record, we discern that defense counsel was referring to the following:
[DEFENSE COUNSEL:] You said that speedor meth or cocaine is a powerful central nervous system stimulant, right?
[AGENT:] Yes.
[DEFENSE COUNSEL:] Speed is, too, isn't it, methamphetamine?
[AGENT:] Yes, it is.
[DEFENSE COUNSEL:] You said that coke speeds up your heart?
[AGENT:] Yes.
[DEFENSE COUNSEL:] Meth speeds up your heart, as well, does it not?
[AGENT:] Yes, it does.
[DEFENSE COUNSEL:] You said that cocaine creates a sense of euphoria?
[AGENT:] Yes.
[DEFENSE COUNSEL:] And speed does exactly the same thing, doesn't it?
[AGENT:] Yes, essentially.
...
[DEFENSE COUNSEL:] To know the difference between speedwell, it would take a chemist or somebody trained in chemistry or pharmacology to be able to answer that question, wouldn't it?
[AGENT:] What was the question? I'm sorry.
[DEFENSE COUNSEL:] The chemical, the chemical relationship between speed and cocaine.
[AGENT:] I would assume so, yes.
[¶ 15] After defense counsel reminded the district court about this testimony, the following exchange occurred:
THE COURT: The trial is about cocaine. The witness testified that cocaine and methamphetamine are different. I don't see any reason why you need to continue with this line of questioning.
[DEFENSE COUNSEL:] Your Honor, the police officer testified that they have virtually identical effects. They speed up the heart; they make people feel good.
THE COURT: What does methamphetamine have to do with this trial?
[DEFENSE COUNSEL:] This substance may very well be methamphetamine and not cocaine. How do we prove it's not methamphetamine? There's no chemical result. We have three little drug addicts who are saying it's cocaine, and there's no proof. We have a police officer who say [sic] they are identical in their effect; and if he wants to distinguish the two, this expert, I should be able to inquire about his expertise in methamphetamine.
THE COURT: He didn't say he was an expert in methamphetamine.
[DEFENSE COUNSEL:] The State is offering him as an expert.
THE COURT: Not in methamphetamine. And I don't think they are offering him as an expert. He's testifying as to his personal experience, certainly not as an expert in the legal sense of the word.
[DEFENSE COUNSEL:] Okay. I made my objection.

*883 THE COURT: Okay. So discontinue the line of inquiry referencing methamphetamine.
[¶ 16] An evidentiary ruling of the district court is reviewed pursuant to the following standard:
Such decisions are within the sound discretion of the trial court and will not be disturbed absent a clear abuse of discretion.... Determining whether the trial court abused its discretion involves the consideration of whether the court could reasonably conclude as it did, and whether it acted in an arbitrary or capricious manner....
A trial court's evidentiary rulings "`are entitled to considerable deference,'" and will not be reversed on appeal so long as "`there exists a legitimate basis for the trial court's ruling ....'"
Lancaster, 2002 WY 45, ¶ 11, 43 P.3d at 87 (quoting Robinson v. State, 11 P.3d 361, 367 (Wyo.2000), cert. denied, 532 U.S. 980, 121 S.Ct. 1620, 149 L.Ed.2d 483 (2001)).
[¶ 17] W.R.E. 103 provides:
(a) Effect of erroneous ruling.Error may not be predicated upon a ruling which admits or excludes evidence unless a substantial right of the party is affected, and
...
(2) Offer of Proof.In case the ruling is one excluding evidence, the substance of the evidence was made known to the court by an offer or was apparent from the context within which questions were asked.
W.R.E. 611(b) provides:

Scope of cross-examination.Cross-examination should be limited to the subject matter of the direct examination and matters affecting the credibility of the witness. The court may, in the exercise of discretion, permit inquiry into additional matters as if on direct examination.
[¶ 18] This Court has stated that the State may rely on circumstantial evidence to prove the identity of a controlled substance because "`unlawful distribution of a substance, which by its nature is to be consumed, should not escape prosecution because the state could not seize a sample of the substance.'" Urrutia v. State, 924 P.2d 965, 968 (Wyo.1996) (quoting Lobatos v. State, 875 P.2d 716, 720 (Wyo.1994)). One of the circumstances relied upon by the State in that regard was the fact that Stone believed the substance to have been cocaine. Defense counsel's cross-examination of both the DCI agent and Stone concerning the similarity between cocaine and methamphetamine clearly was meant to show that the two substances are so similar in effect that they may be confused by a user. The State did not object during the cross-examination of either witness. Yet the district court, on its own initiative, halted the cross-examination of Stone on the ground that it was beyond the scope of the direct examination.
[¶ 19] The general rule that evidentiary decisions are within the sound discretion of the trial court applies to decisions made under W.R.E. 611(b). Caterpillar Tractor Co. v. Donahue, 674 P.2d 1276, 1285-86 (Wyo.1983); Grabill v. State, 621 P.2d 802, 814 (Wyo.1980). The exercise of that discretion must, however, be guided by recognized principles of law. One of those principles is that wide latitude should be permitted in the cross-examination of an adverse witness. In re Morton's Estate, 428 P.2d 725, 733 (Wyo. 1967). Further, when a matter is raised during direct examination, the adverse party may then explore that matter on cross-examination. Summers v. State, 725 P.2d 1033, 1046 (Wyo.1986) (quoting Kwallek v. State, 596 P.2d 1372, 1378 (Wyo.1979)). Once a party opens the door to a line of questions, "he cannot complain that the [adverse party] asked ... similar questions." Hodges v. State, 904 P.2d 334, 343 (Wyo.1995). In some cases, the constitutional right to confront witnesses may even require the trial court to allow cross-examination that goes beyond the scope of direct examination to test credibility. Jones v. State, 735 P.2d 699, 702 (Wyo.1987); Lindsey v. State, 725 P.2d 649, 658 (Wyo.1986); Story v. State, 721 P.2d 1020, 1034 (Wyo.), cert. denied, 479 U.S. 962, 107 S.Ct. 459, 93 L.Ed.2d 405 (1986), cert. denied, 498 U.S. 836, 111 S.Ct. 106, 112 L.Ed.2d 76 (1990).
*884 [¶ 20] It has also been held:
It is well established that the scope of proper cross-examination may extend to the whole transaction of which the witness has testified, or it may be employed to elicit any matter which may tend to overcome, qualify or explain the testimony given by a witness on his direct examination.
People v. Dotson, 46 Cal.2d 891, 299 P.2d 875, 879 (1956).
[A party] cannot adopt a strategy and at the same time preclude the [adverse party] from testing its validity by cross-examination....
Com. v. Williams, 227 Pa.Super. 103, 323 A.2d 135, 140 (1974). See also Roby v. State, 587 P.2d 641, 650 (Wyo.1978) (Raper, J., dissenting, with whom Thomas, J., joins). The district court violated these rules in this case when it sua sponte declared defense counsel's questions to be beyond the scope of direct examination. Stone testified that it was his opinion that the drug involved was cocaine. Through his questions about the similarity between the effects of cocaine and methamphetamine, defense counsel attempted to test the basis for that opinion. Those questions certainly were not beyond the scope of Stone's direct examination. The State's strategy was to prove one element of the crimethat Dysthe had delivered cocainethrough the opinion testimony of one of the users. The State certainly could not then object because Dysthe attempted to test that opinion. Perhaps that is why the State did not object.
[¶ 21] We conclude that the district court's ruling constituted an abuse of discretion. As we have previously stated, because no drug was retrieved and entered into evidence, the State's case was based solely on the credibility of its witnesses. In testing Stone's credibility, defense counsel was entitled to explore the foundation for his opinion. Furthermore, this was not harmless error due to the importance of Stone's opinion to the State's case.

PROSECUTORIAL MISCONDUCT
[¶ 22] Dysthe's last argument is that the prosecutor committed misconduct in his closing argument. Allegations of prosecutorial misconduct are reviewed
"by reference to the entire record and hinge on whether a defendant's case has been so prejudiced as to constitute denial of a fair trial. Similarly, the propriety of any comment within a closing argument is measured in the context of the entire argument.... [R]eversal is not warranted unless a reasonable probability exists, absent the error, that the appellant may have enjoyed a more favorable verdict."
Mazurek v. State, 10 P.3d 531, 542 (Wyo. 2000) (quoting English v. State, 982 P.2d 139, 143 (Wyo.1999)). The burden of proof is assigned to the defendant. Tennant v. State, 786 P.2d 339, 346 (Wyo.1990).
[¶ 23] Because no objection to the prosecutor's closing argument was made at trial, we review the claim under our plain error standard. Mitchell v. State, 982 P.2d 717, 723-24 (Wyo.1999). "`Plain error exists when 1) the record is clear about the incident alleged as error; 2) there was a transgression of a clear and unequivocal rule of law; and 3) the party claiming the error was denied a substantial right which materially prejudiced him.'" Mazurek, 10 P.3d at 535 (quoting Yetter v. State, 987 P.2d 666, 668 (Wyo.1999)). Prejudice results if Dysthe can show that he was not allowed a trial on its own merits. Mazurek, 10 P.3d at 536. Where the plain error elements are met, we may correct the error if it " ` "seriously affect[s] the fairness, integrity, or public reputation of judicial proceedings." ' ..." Johnson v. United States, 520 U.S. 461, 469-70, 117 S.Ct. 1544, 137 L.Ed.2d 718 (1997) (quoting United States v. Olano, 507 U.S. 725, 736, 113 S.Ct. 1770, 123 L.Ed.2d 508 (1993), cert. denied, 519 U.S. 931, 117 S.Ct. 303 (1996)).
[¶ 24] Closing arguments must be based upon the evidence submitted to the jury. The purpose of closing argument is to allow counsel to offer ways of viewing the significance of the evidence. Hopkinson v. State, 632 P.2d 79, 145 (Wyo.1981). Prosecutors, just like defense counsel, may review the evidence and suggest to the jury inferences based thereon. Trujillo v. State, 2002 WY 51, ¶ 5 n. 2, 44 P.3d 22, 24 n. 2 (Wyo. 2002) (quoting Browder v. State, 639 P.2d *885 889, 893 (Wyo.1982)). There are limits, however, on prosecutor's closing arguments that are designed to insure the fairness of the trial and prevent compromise of the judicial system. We have recently adopted the broad guidelines found in I A.B.A., Standards for Criminal Justice 3-5.8 at 3.87 to 3.88 (2d ed.1980):
"(a) The prosecutor may argue all reasonable inferences from evidence in the record. It is unprofessional conduct for the prosecutor intentionally to misstate the evidence or mislead the jury as to the inferences it may draw.
(b) It is unprofessional conduct for the prosecutor to express his or her personal belief or opinion as to the truth or falsity of any testimony or evidence or the guilt of the defendant.
(c) The prosecutor should not use arguments calculated to inflame the passions or prejudices of the jury.
(d) The prosecutor should refrain from argument which would divert the jury from its duty to decide the case on the evidence, by injecting issues broader than the guilt or innocence of the accused under the controlling law, or by making predictions of the consequences of the jury's verdict."
Wilks v. State, 2002 WY 100, ¶ 27, 49 P.3d 975, 986-87 (Wyo.2002).
[¶ 25] Because the goal of the criminal justice system is the attainment of justice, the role of the prosecuting attorney differs from that of an advocate in a civil case. The prosecutor's special role has been described in Berger v. United States, 295 U.S. 78, 88, 55 S.Ct. 629, 79 L.Ed. 1314 (1935):
The [prosecutor] is the representative not of an ordinary party to a controversy, but of a sovereignty whose obligation to govern impartially is as compelling as its obligation to govern at all; and whose interest, therefore, in a criminal prosecution is not that it shall win a case, but that justice shall be done. As such, he is in a peculiar and very definite sense the servant of the law, the twofold aim of which is that guilt shall not escape or innocence suffer. He may prosecute with earnestness and vigorindeed, he should do so. But, while he may strike hard blows, he is not at liberty to strike foul ones. It is as much his duty to refrain from improper methods calculated to produce a wrongful conviction as it is to use every legitimate means to bring about a just one.
[¶ 26] The first element of the plain error standard is met as to the first allegation of prosecutorial misconduct in the instant case because the record clearly reveals the alleged misconduct. During closing argument, the prosecutor stated:
So this is after, after allafter all of the evidence, a case about this Defendant making a very, very bad choice. And it is a case about him trying to avoid responsibility for that choice.
You can hold him responsible. And based on the evidence and the law, you must hold him responsible. You have given an oath to do that, to follow the law and listen to the evidence. I would ask that you follow your oath. You consider the evidence. You consider the law and you return a guilty verdict against the Defendant, Kilen Dysthe, for delivery of a controlled substance, cocaine.
[¶ 27] At first glance, it might appear that the second element of plain error analysis is also met. When a portion of the prosecutor's argument is taken out of context, it could be argued that the prosecutor told the jurors that the way to follow their oath was to "hold him responsible." Such would violate the clear and unequivocal rule of law that "[i]t is ... improper for the prosecutor to state that the duty of the jury is to find the defendant guilty." United States v. Sanchez, 176 F.3d 1214, 1224 (9th Cir.1999). But while we find the continued use of such arguments by prosecutors troublesome, we are unable to distinguish this argument, in context, from the one we recently found not to be prosecutorial misconduct in Wilks.[7]
*886 [¶ 28] Dysthe next argues that the prosecutor committed misconduct by vouching for the credibility of witnesses. Referring to the State's witnesses, the prosecutor said:
These witnesses, despite the fact that they are users, were credible. They were very credible. They were more credible because of the very fact that they have a relationship with this Defendant. More credible because, if you couldn't tell, I certainly could; they didn't like me asking them questions. They didn't want to be telling me anything.
The prosecutor also stated that he worked with the investigators on the case and he could "guarantee" that their investigations were not "arbitrary." He told the jury that the witnesses had no reason to lie.
[¶ 29] "It is improper for the prosecuting attorney, even in responding to defense arguments, to personally vouch for the credibility of the state's witnesses." Lane v. State, 12 P.3d 1057, 1065 (Wyo.2000). The rationale for this rule has been stated as follows:
"When the prosecutor asserts his credibility or personal belief, an additional factor is injected into the case. This additional factor is that counsel may be perceived by the jury as an authority whose opinion carries greater weight than their own opinion; that members of the jury might be persuaded not by the evidence, but rather by a perception that counsel's opinions are correct because of his position as prosecutor, an important state official entrusted with enforcing the criminal laws of a sovereign state. While the prosecutor is expected to be an advocate, he may not exploit his position to induce a jury to disregard the evidence or misapply the law."
Id. (quoting Barela v. State, 787 P.2d 82, 83-84 (Wyo.1990)). See also Mazurek, 10 P.3d at 542 (quoting Browder, 639 P.2d at 893) ("`unprofessional conduct for the prosecutor to express his or her personal belief or opinion as to the truth or falsity of any testimony or evidence of the guilt of the defendant.'").
[¶ 30] Given these guidelines, we cannot conclude other than that the prosecutor's comments in the present case crossed the line between legitimate argument and illegitimate vouching for the credibility of the State's witnesses. While he did not directly state that it was his opinion that the witnesses were credible, he certainly gave that impression. Further, he did not suggest that the determination was to be made by the jurors; instead, he offered his own observation that the witnesses were "more credible" because "if you couldn't tell, I certainly could [that] they didn't like me asking them questions." And finally, his personal guarantee that the investigation was not arbitrary certainly amounted to a personal attestation of fact.
[¶ 31] The third element of plain error analysis is that the error must "affect substantial rights." This is the same language found in W.R.Cr.P. 52(b), and it means that the error or defect must adversely affect some substantial right of the accused to avoid a conclusion of harmless error. Hampton v. State, 558 P.2d 504, 507 (Wyo.1977); Hopkinson, 632 P.2d at 145. The question in the instant case is whether the prosecutor's misconduct affected Dysthe's right to a fair trial. We conclude that it did. As we mentioned repeatedly above, the State's case depended entirely on the jury finding its witnesses credible. It is impossible in this case to know whether the conviction resulted from the jury's independent evaluation of the evidence or from the jury's having been swayed by the prosecutor's improper arguments.

CONCLUSION
[¶ 32] The district court abused its discretion when it precluded the testimony of two defense witnesses and when it foreclosed the cross-examination of one of the State's witnesses. In addition, prosecutorial misconduct during closing argument adversely affected Dysthe's right to a fair trial.
*887 [¶ 33] We reverse and remand for a new trial.
NOTES
[1]  Both Stone and Jacquot were granted transactional immunity for their testimony.
[2]  U.S. Const. amend. VI states: "In all criminal prosecutions, the accused shall enjoy the right to... have compulsory process for obtaining witnesses in his favor ...." U.S. Const. amend. XIV reads: "[N]or shall any State deprive any person of life, liberty, or property, without due process of law ...."
[3]  Wyo. Const. art. 1, § 10 states: "In all criminal prosecutions the accused shall have the right to... have compulsory process served for obtaining witnesses ...."
[4]  W.R.Cr.P. 12.1(a) requires that "the defendant shall serve within 10 days, or at such different time as the court may direct, upon the attorney for the state a written notice of defendant's intention to offer a defense of alibi."
[5]  Because even an error of constitutional proportion is subject to harmless error analysis, that analysis was applied in Lawson and the conviction was affirmed. Lawson, 994 P.2d at 947.
[6]  Dysthe's counsel argued to the district court, prior to jury selection, that the prosecutor, as an incentive for Jacquot's testimony

file[d] a motion and basically ha[d] the whole thing quashed and ha[d] the kid taken out of Drug Court, period.... The issue in this case is what did that kid think. I think it is very important to show that he's mighty beholden to the prosecutor for coming basically to his rescue, in his eyes.
No doubt, this was the limited subject to which counsel referred during the bench conference when he said, "I want to ask him if he has been, if he has been threatened with prosecution by Drug Court personnel; and isn't it true that when you or your father objected to the prosecutor's office, the problems were taken care of."
[7]  The prosecutor's argument in Wilks was:

"Read the law. Please follow the law. It's all there for you. I don't want you to twist it. I don't want you to turn it. Just read it as it is and apply the facts to the law.
There is no triumph greater than the ascertainment of the truth. That's your job. Do your duty, please, and find the Defendant guilty of First Degree Murder."
Wilks, 2002 WY 100, ¶ 28, 49 P.3d at 987. See also Hart v. State, 2003 WY 12, ¶ 14, 62 P.3d 566 (Wyo.2003).
