
118 Mich. App. 537 (1982)
325 N.W.2d 485
PEOPLE
v.
ALLEN
Docket No. 51189.
Michigan Court of Appeals.
Decided August 23, 1982.
Frank J. Kelley, Attorney General, Louis J. Caruso, Solicitor General, Peter D. Houk, Prosecuting Attorney, Janis L. Blough, Chief Appellate Attorney, and Susan K. Marshall, Assistant Prosecuting Attorney, for the people.
P.E. Bennett, Assistant State Appellate Defender, for defendant on appeal.
Before: DANHOF, C.J., and BEASLEY and J.P. SWALLOW,[*] JJ.
DANHOF, C.J.
Defendant was convicted on December 13, 1979, of delivery of less than 50 grams of heroin in violation of MCL 333.7401(2)(a)(iv); MSA 14.15(7401)(2)(a)(iv), following a jury trial. He was subsequently convicted as a habitual offender, *540 fourth offense. MCL 769.12; MSA 28.1084. He was sentenced to serve a term of 10 to 20 years in prison. Defendant appeals as of right.
Defendant's convictions arose out of a sale of heroin made to a police informant in the presence of Helen Janson, a Lansing police officer. Janson and the informant both testified that when the informant approached defendant he was in the company of a woman, later determined to be Lori Antonio, and Calvin Markham. They both claimed that no other persons were present. The informant gave defendant two $20 bills and received $15 in change from Antonio. Defendant gave her a small foil package which contained a substance later determined to be heroin.
Defendant moved to indorse Antonio and Sheridell Black as res gestae witnesses. At a hearing held on the motion, Black testified that he was present at the time the alleged sale took place and that it was Markham, not defendant, who delivered the foil package to the informant. Antonio also testified that Black was present and corroborated his testimony that the package was delivered by Markham. Janson and the informant denied Black's presence. The trial court resolved the conflict in favor of the prosecution and ruled that Black was not required to be indorsed as a res gestae witness. The court also denied defendant's motion with respect to Antonio, ruling that she was an accomplice. However, the trial court informed defendant that he could subpoena the witnesses at the court's expense. Both witnesses were subpoenaed and testified on behalf of defendant.
Defendant contends that the trial judge erred by refusing to grant his motion to indorse these two witnesses. With respect to Antonio, we agree with the trial court that the prosecutor was not required *541 to indorse her because she was an accomplice. The prosecution is not obligated to present an accomplice as a res gestae witness. People v White, 401 Mich 482, 508; 257 NW2d 912 (1977). The situation with respect to Black presents a more difficult problem. Although it is the duty of the trial court to resolve issues of fact concerning whether a person is a res gestae witness, People v Pearson, 404 Mich 698, 721; 273 NW2d 856 (1979), every reasonable doubt as to whether a witness is a res gestae witness must be resolved in favor of indorsing and calling the witness. People v Austin, 95 Mich App 662, 674; 291 NW2d 160 (1980), People v Harrison, 44 Mich App 578; 205 NW2d 900 (1973). The reason for this rule can be gleaned from a portion of the Court's opinion in Harrison, supra, wherein the Court quoted from Hurd v People, 25 Mich 405 (1872):
"`The prosecutor in a criminal case, is not at liberty, like a plaintiff in a civil case, to select out a part of an entire transaction which makes against the defendant, and then, to put the defendant to the proof of the other part, so long as it appears at all probable from the evidence, that there may be any other part of the transaction undisclosed; especially, if it appears to the court that the evidence of the other portion is attainable. The only legitimate object of the prosecution is, "to show the whole transaction, as it was, whether its tendency be to establish guilt or innocence." The prosecuting officer represents the public interest, which can never be promoted by the conviction of the innocent. His object like that of the court, should be simply justice; and he has no right to sacrifice this to any pride of professional success. And however strong may be his belief of the prisoner's guilt, he must remember that, though unfair means may happen to result in doing justice to the prisoner in the particular case, yet, justice so attained, is unjust and dangerous to the whole community. And, according to the well-established rules of *542 the English courts, all the witnesses present at the transaction, should be called by the prosecution, before the prisoner is put to his defense, if such witnesses be present, or clearly attainable. See Maher v People, 10 Mich 225, 226 [1862].'" 44 Mich App 578, 594-595.
This is not a situation in which it is admitted that the witness was present, but the issue raised is whether he was present during the continuum of the criminal transaction. On the contrary, it is clear that if the witness was present he did witness the entire event. In our opinion, when a witness comes forward and personally testifies that he was present at the scene of the crime and that he witnessed the entire criminal transaction, questions of credibility must be resolved in favor of indorsement. If the prosecutor believes that the witness is not telling the truth, the proper procedure is to impeach the witness in the manner permitted by MRE 607. People v Harrison, supra, 598. Therefore, the trial court erred by refusing to grant defendant's motion to indorse Black. However, we do not believe that such error requires reversal.
As noted above, although the prosecutor did not indorse Black, Black was subpoenaed and did testify on behalf of defendant. The concerns expressed in Harrison, supra, 599-600, are not present in this case. Although, by calling Black as a witness, defendant was technically precluded from cross-examining him, defendant asked numerous leading questions of the witness, none of which were objected to by the prosecutor. Furthermore, since Black's testimony was entirely favorable to defendant, he had no reason to attempt to impeach the witness. Finally, although admittedly Black's credibility may have been somewhat enhanced if he had been called by the prosecutor, since the *543 prosecutor would have been able to impeach his credibility and since two other witnesses presented by the prosecutor denied that Black was even present, we find that the error complained of was harmless.
Defendant next contends that the trial court erred by permitting the prosecutor to cross-examine Black concerning whether he had ever before seen foil packages of the sort he claimed that Markham delivered to the informant. The question was prompted by defense counsel's questioning of Black concerning whether Black knew what the package contained. Black responded, "A small package. I don't know what it was, but it was * * *". Black's complete response was cut off by defense counsel. Under these circumstances, it is clear that the prosecutor's questioning was merely an attempt to elicit a complete response to the question, not to show that Black used heroin. Even if Black's answer to the question left the jury with the impression that Black used heroin, this case is not analogous to People v McKinney, 410 Mich 413; 301 NW2d 824 (1981). In McKinney, supra, the prosecutor's question concerning heroin involvement was directly related to such use and was asked of the defendant himself. The prejudice inherent in such questioning is much greater than was the isolated incident which occurred in the present case. Therefore, we reject defendant's claim that such questioning deprived him of a fair trial.
Defendant next contends that the trial court's refusal to permit him to question the informant concerning her involvement with heroin constituted error. On appeal, defendant contends that he wished to examine the informant on this subject to show that Markham was informant's heroin supplier, *544 thereby showing that the informant had reason to name defendant, rather than Markham, as the person who delivered the heroin to her. Such purpose was not advanced at trial. On the contrary, defendant offered to show that the informant admitted at defendant's preliminary examination that she used heroin but that on an earlier occasion she had denied the same. Defendant wished to impeach her by use of such prior inconsistent statement.
The trial court was correct in precluding inquiry into such a collateral matter. See People v Bashans, 80 Mich App 702, 713; 265 NW2d 170 (1978). In any event, the trial court did not foreclose all inquiry into the informant's alleged heroin use. The court indicated that defendant could attempt to show that the informant was using the drug at or near the time that the purchase took place to show that the informant's ability to perceive the events accurately may have been impaired. Under these circumstances, the trial court's decision was not erroneous. Had defendant advanced the reason at trial that he advances on appeal for the introduction of such evidence, a more difficult question would be presented. People v Monasterski, 105 Mich App 645; 307 NW2d 394 (1981).
Defendant finally contends that his 1970 plea-based conviction for larceny in a building is invalid and that he could not be sentenced as a fourth-felony habitual offender.
Defendant's plea was taken after the United States Supreme Court's decision in Boykin v Alabama, 395 US 238; 89 S Ct 1709; 23 L Ed 2d 274 (1969). In People v Jaworski, 387 Mich 21, 30-31; 194 NW2d 868 (1972), our Supreme Court held that guilty pleas taken after the decisional date in Boykin, supra, are invalid if the plea-taking court *545 failed to inform defendant, on the record, that by pleading guilty he was waiving his privilege against self-incrimination, his right to trial by jury, and his right to confront his accusers.
At defendant's 1970 plea-taking proceeding, the court did not advise him that by pleading guilty he was waiving his privilege against self-incrimination and his right to confront his accusers. Therefore, his conviction was invalid and may not be used to enhance his sentence pursuant to the habitual offender statute. See People v Moore, 391 Mich 426; 216 NW2d 770 (1974), People v Watroba, 89 Mich App 718, 723; 282 NW2d 196 (1979), People v Jones, 83 Mich App 559; 269 NW2d 224 (1978).
The prosecution argues that, because defendant was represented by counsel at the 1970 plea-taking proceeding, the conviction may still serve as a basis to enhance defendant's sentence despite the fact that defendant was not advised by the trial court of his rights as required by Boykin, supra. See People v Crawford, 98 Mich App 309, 312; 296 NW2d 244 (1980), lv gtd 412 Mich 884 (1981). We disagree. A guilty plea, to be valid, must be understandingly and voluntarily made. Boykin, supra. A plea cannot be understandingly made unless the defendant understands the consequences of his act. In Jaworski, supra, the Supreme Court ruled that the defendant's plea was not understandingly made and that his plea-based conviction was invalid despite the fact that he was represented by counsel at the plea-taking proceeding. In so doing, the Supreme Court expressed its unwillingness to presume, from the mere fact that the defendant was represented by counsel, that he was fully advised of all of the rights he was giving up by his plea of guilty.
*546 Therefore, in our view, the fact that defendant was represented by counsel at the 1970 plea-taking proceeding does not render an otherwise invalid conviction valid for purposes of applying the sentencing enhancement provisions of the habitual offender statute.
Defendant's conviction on the principal charge is affirmed. His fourth-felony habitual offender conviction is vacated and the cause is remanded so that the trial court may resentence defendant as a third-felony habitual offender.
NOTES
[*]  Circuit judge, sitting on the Court of Appeals by assignment.
