Appellant was convicted of distribution of dilaudid1 and possession of dilaudid.2 On appeal he challenges only the distribution conviction. Appellant contends that the trial court erred in refusing to restrict, in advance, the government’s cross-examination of a defense witness, and that the court abridged his right to a fair trial by arrogating the prosecutorial function to itself, interfering with defense counsel’s examination of witnesses, and manifesting hostility to the defense. We find no reversible error and affirm the conviction.
I
On the evening of December 7, 1982, Officer Robert Moroney, an undercover narcotics officer, went to the area of 12th and N Streets, N.W. There he was approached by Larry Hodge, who asked if he could “serve” Moroney. After a brief conversation, the two men agreed on a sale of dilaudid. Together they walked to the corner of 11th and N Streets, where Hodge told Moroney to wait. Hodge crossed the street and spoke to another man — appellant — who appeared to hand Hodge something. Hodge and appellant then came back across the street, and Hodge gave Moroney a dilaudid pill wrapped in aluminum foil. At this point appellant was about two feet from Moroney, standing almost directly under a street lamp, and Moroney could see him clearly. As Moro-ney was preparing to pay Hodge for the pill, appellant warned Hodge that Moroney looked like the police and that he should not sell to him. Nevertheless, the sale was completed, and Moroney left. A few min*220utes later, after Moroney had broadcast a description of the two men, Hodge was arrested by other officers. Moroney drove past the scene of the arrest and identified him. Another officer detained a man thought to be the holder of the drugs, but after Moroney drove by and informed the officer by radió that this man was not the holder, he was released.
Two days later, on December 9, Officer Moroney returned to the same area to make another undercover buy. He was accompanied this time by another officer, Vincent Pugliese. When Allen Cunningham approached and offered his services, Pugliese told Cunningham that he and Mo-roney would like to buy some dilaudid. Cunningham walked across the street and approached appellant, whom Moroney immediately recognized as the man he had seen on December 7. Moroney turned away so that appellant would not recognize him. Cunningham then returned and handed Pugliese a foil packet containing two dilaudid pills; the officers in turn gave Cunningham $60 in bills whose serial numbers had been pre-recorded. Pugliese and Moroney left the area and broadcast descriptions of both men, and soon thereafter appellant and Cunningham were placed under arrest.3 Moroney and Pugliese made a ride-by identification of both suspects. Mo-roney also identified appellant in court. Pugliese, however, was not asked to make an in-court identification, and he admitted on cross-examination that he had not been able to identify appellant in court at an earlier hearing.
Appellant’s defense was misidentification. Hodge and Cunningham, his former co-defendants,4 admitted in their testimony that they had sold drugs on December 7 and 9, respectively, but both of them said that appellant was not the other man involved in the sales.5 Both men were impeached by prior drug convictions. The manager of a tourist home testified that appellant and his girl friend had been registered guests at his establishment from December 6 through December 10.
The jury found appellant guilty of distribution of dilaudid on December 7 and possession of dilaudid on December 9. It acquitted him of the charge of distribution on December 9.
II
On the second day of trial, defense counsel asked the court to make an in limine ruling restricting the government’s cross-examination of a proposed defense witness, Linda Koonce, appellant’s girl friend. Counsel proffered that Koonce would testify that she had been staying with appellant at the tourist home on December 7 and that they were still in their room when Hodge sold dilaudid to Officer Moroney. Furthermore, since she was not absolutely sure about the time, she would also describe the clothing appellant was wearing that evening, which was different from Moroney’s description of the clothing worn by Hodge’s confederate.
Counsel anticipated that on cross-examination the government would ask how Koonce remembered what appellant was wearing. Her response would be that appellant had been released from jail on December 6 on a charge that was subsequently dropped and had not changed his clothes overnight. Defense counsel feared that such testimony would be prejudicial and *221asked the court to prohibit the government from asking a question that would elicit such an answer from the witness. The court refused to rule until the government had actually begun its cross-examination. It expressed the tentative view that the government had “a right to ventilate these issues,” but it agreed to bar any questioning about why appellant was in jail, how long he had been there, or whether he had been in jail on other occasions. The court also said that defense counsel could show that the charges against appellant had ultimately been dismissed, and suggested that the government might even stipulate to that. Defense counsel, however, rejected the suggestion, and eventually she decided not to call Koonce at all.
The trial court’s ruling was proper. If evidence is otherwise relevant, the fact that it may tend to suggest other criminal activity by the defendant does not necessarily make it inadmissible, Bracey v. United States, 79 U.S.App.D.C. 23, 27-28, 142 F.2d 85, 89-90, cert. denied, 322 U.S. 762 (1944), although its admissibility may in some respects be limited. See, e.g., Drew v. United States, 118 U.S.App.D.C. 11, 15-16, 331 F.2d 85, 89-90 (1964). In this case the government had a right to test the witness’ memory by asking her why she remembered what appellant was wearing on December 7. See United States v. Bussey, 139 U.S.App.D.C. 268, 273, 432 F.2d 1330, 1335 (1970); Hood v. United States, 125 U.S.App.D.C. 16, 18, 365 F.2d 949, 951 (1966). The decision to allow such cross-examination is left to the discretion of the trial judge,6 who may permit it if its probative value is greater than its prejudicial effect. See Brown v. United States, 387 A.2d 728, 730 (D.C.1978); United States v. Williamson, 482 F.2d 508, 514 (5th Cir.1973). In this instance the probative value was substantial, since Koonce’s ability to remember the details of appellant’s alibi was an important part of the case. On the other hand, the prejudicial effect of the cross-examination, with the restrictions and stipulations suggested by the court, would not have been great. Accordingly, we find no abuse of discretion.7
Ill
Appellant asserts that twelve instances of alleged misconduct by the trial court prejudiced his right to a fair trial. We need not consider most of these claims, since the acts of which appellant complains took place out of the jury’s presence and could not have affected its verdict. See, e.g., United States v. McCord, 166 U.S.App.D.C. 1, 15, 509 F.2d 334, 348 (1974) (en banc), cert. denied, 421 U.S. 930, 95 S.Ct. 1656, 44 L.Ed. 87 (1975). Nor does the record support the argument that the atmosphere of the trial was irreparably tainted by the court’s actions,8 or that defense counsel was “thrown off balance”9 in the presentation of her case. Indeed, defense counsel, who is also counsel on appeal, acknowledged at oral argument that she was not unnerved or distracted by the trial court’s conduct. In short, most of appellant’s claims of judicial overreaching are *222unfounded and do not merit discussion. There were, however, two incidents which we find disturbing.
First, appellant contends that the trial court arrogated the prosecutorial function to itself by suggesting strategy and tactics to the prosecutor. In one instance this contention has merit. During his cross-examination of Allen Cunningham, the prosecutor asked about certain statements Cunningham had made when he entered his guilty plea. After the questioning had ended, the court asked the prosecutor whether he was impeaching the witness with a prior inconsistent statement or whether he was asking the witness to adopt the prior statement as the truth. After further discussion Cunningham resumed the stand, and the prosecutor asked him several more questions.
To the extent that the court sought to clarify the witness’ testimony, appellant has no basis for complaint. See, e.g., Khaalis v. United States, 408 A.2d 313, 355 (D.C.1979), cert. denied, 444 U.S. 1092, 100 S.Ct. 1059, 62 L.Ed.2d 781 (1980); Womack v. United States, supra note 9, 350 A.2d at 383. The court went further, however, and suggested to the prosecutor a tactical course which he had not considered.10 This was improper. The trial court “must not take on the role of a partisan.... Prosecution and judgment are two separate functions in the administration of justice; they must not merge.” United States v. Marzano, 149 F.2d 923, 926 (2d Cir.1945), quoted in Shannon v. United States, 311 A.2d 501, 505 (D.C.1973). Nevertheless, in light of the record as a whole, we see no reason to reverse the conviction on account of this incident. See Greenhow v. United States, 490 A.2d 1130, 1136-1137 (D.C.1985).11
Second, appellant contends that the court exceeded permissible bounds when it asked, immediately after defense counsel completed her cross-examination of Officer Pugliese, a series of leading questions which effectively rehabilitated Pugliese. Appellant argues that the error was compounded when the court refused, in the presence of the jury, to permit defense counsel to conduct any further cross-examination. The combination of the court’s own questions and its barring of further questions by defense counsel troubles us greatly. We need not decide, however, whether these actions in combination constituted error, because if they did, the error was unquestionably harmless. Officer Pugliese’s testimony related only to the December 9 distribution charge. Since the jury acquitted appellant of that charge, he could not possibly have been prejudiced by what the court did.
Affirmed.
. D.C.Code § 33-541(a)(l) (1985 Supp.).
. D.C.Code § 33-541(d) (1985 Supp.).
.When Cunningham was arrested, he had in his possession four one-dollar bills whose serial numbers were among those recorded by Officer Moroney. When appellant was arrested, the arresting officers saw him put something in his mouth. They made him spit it out and found that it was an aluminum foil packet containing two dilaudid pills. These pills were the basis of the possession conviction, which appellant does not contest.
. The charges against Hodge and Cunningham had been resolved before trial by plea bargains.
. Hodge said that he had received the drugs on December 7 from a man known as "Big Butt Ronnie.” Cunningham said that he and another man named Ronnie (apparently not Big Butt Ronnie) had approached Moroney and Pugliese on December 9, and that they had both crossed the street to obtain the two dilaudid tablets from another man, who was not appellant.
. No claim is made here of any failure by the court to exercise its discretion, which would itself have been an abuse of discretion. See Johnson v. United States, 398 A.2d 354, 363-364 (D.C.1979). The court gave extended consideration to the issues raised by defense counsel. In a discussion extending over four pages of transcript, both the court and counsel explored possible solutions to the problem. Any suggestion that the court had prejudged the issue would not find support in the record.
. The government urges us to base our decision on the principle announced in Luce v. United States, 469 U.S. 38, 105 S.Ct. 460, 83 L.Ed.2d 443 (1984). We decline to do so. Not only were the facts in Luce different from the facts here, but Luce was decided after this case was tried, so that we would have to grapple with difficult questions of retroactivity. We see no need to trouble ourselves with such matters, since we can decide the case on the merits without reference to Luce.
. Compare Petway v. United States, 391 A.2d 798 (D.C.1978); Williams v. United States, 228 A.2d 846 (D.C.1967); Peckham v. United States, 93 U.S.App.D.C. 136, 210 F.2d 693 (1953).
. Womack v. United States, 350 A.2d 381, 383 (D.C.1976).
. After the prosecutor had said, "I have no further questions," the court called counsel to the bench. The entire bench conference was as follows:
THE COURT: You used the transcript from the plea of guilty and you never asked him if that was truthful testimony, leaving me in a very confused state of whether that is a prior inconsistent statement or he now adopts them [sic ] as truthful. During the trial you have to make a choice about what you are going to do.
MR. SELLINGER [the prosecutor]: Otherwise I am restrained?
THE COURT: Tactically I think you would ask him if he told the judge the truth and the things he read in the transcript were truthful, then they become testimony at this trial, and they are not prior inconsistent statements, but you have to ftsh or cut bait. I am a little surprised.
MR. SELLINGER: Okay.
The prosecutor then returned to counsel table and asked the witness a series of questions along the lines suggested by the court.
. It is, of course, permissible for the court to suggest how counsel may proceed properly after an objection has been made, or to act sua sponte in order to avoid prejudicial error. See Womack v. United States, supra note 9, 350 A.2d at 382-383, and cases cited therein; ABA Standards for Criminal Justice § 6-1.1(a), and Commentary at 6.7 (2d ed. 1980). What the trial court did here, however, was to offer unsolicited tactical advice to an able prosecutor who did not need it-