Appeal by the defendant from a judgment of the Supreme Court, Kings County (Fisher, J.), rendered October 29, 1986, convicting him of robbery in the second degree (two counts), assault in the third degree, criminal possession of stolen property in the third degree, and criminal possession of a hypodermic instrument, upon a jury verdict, and imposing sentence.
Ordered that the judgment is affirmed.
The crimes charged arose from an incident which occurred on the afternoon of September 16, 1985, during a "buy and bust” operation at a Brooklyn housing project. At that time the defendant offered to sell heroin to an undercover officer and, thereafter, the defendant, acting in concert with three other individuals, attacked the undercover officer striking him with fists, a stick and a broom, and robbing him of $70 of prerecorded "buy” money.
The court closed the courtroom to the public during the testimony of the prosecution’s main witness, the undercover officer. In addition, the court, over defense counsel’s objection, excluded defense counsel’s Legal Aid supervisor during the testimony of the undercover officer.
Relying on Judiciary Law § 4, the defendant argues that the court abused its discretion in refusing to permit the Legal Aid supervisor to remain in the courtroom during this key testimony and thereby denied him his right to a public trial. Judiciary Law § 4 empowers trial courts in the exercise of their discretion under certain circumstances to exclude from the courtroom "all persons who are not directly interested [in the proceedings]”. An exception to the exclusion provision is provided for "jurors, witnesses, and officers of the court”. On the basis of this exception, the defendant argues that the defense counsel’s supervisor, as an attorney admitted to practice law, was an officer of the court and, therefore, not subject to exclusion. Notably, the defendant does not challenge the propriety of the court’s exclusion of the public.
We conclude that the exclusion of the Legal Aid supervisor was a proper exercise of the trial court’s discretion and did not deprive the defendant of his right to counsel or to a fair trial (see, e.g., People v Joseph, 59 NY2d 496; People v Gillespie, 58 AD2d 893). The record reveals that the defendant’s *839attorney had exhibited full competence in the conduct of the defense and had not previously sought the guidance of his supervisor during the course of the trial. Nor was the supervisor listed as cocounsel. There is no indication in the record that the defense counsel’s supervisor participated in any active manner in the trial. Thus, the order of the trial court closing the courtroom during the undercover officer’s testimony did not exclude any person essential to the defense.
We further find that the evidence was legally sufficient to establish that the undercover officer suffered "physical injury” within the meaning of Penal Law § 10.00 (9) necessary to sustain the defendant’s conviction of one count of robbery in the second degree under Penal Law § 160.10 (2) (a) and assault in the third degree under Penal Law § 120.00 (1) (see, People v Bogan, 70 NY2d 860, rearg denied 70 NY2d 951). Penal Law § 10.00 (9) defines physical injury as "impairment of physical condition or substantial pain”. At bar, the undercover officer testified that later in the evening on the date of the incident he began to "ache all over” due to the attack and sought medical attention in the emergency room of a local hospital. He complained of injuries to his head, back and hip area which he described as "pretty painful”. The hospital record which was admitted into evidence revealed that the undercover officer had suffered abrasions, lacerations and soft tissue trauma. He was released with a prescription for a painkiller and with instructions to apply ice and then heat to his injuries. We find the record supports the jury’s finding of "substantial pain” necessary to sustain thé assault and one of the robbery convictions (see, People v Greene, 70 NY2d 860; People v Rojas, 61 NY2d 726, 727; Matter of Philip A., 49 NY2d 198, 200).
Lastly, we find the prosecutor’s inquiry of the defendant’s use of aliases and various addresses in connection with offenses about which cross-examination had been precluded by the trial court’s Sandoval ruling (People v Sandoval, 34 NY2d 371) to have been improper. However, the error did not serve to deprive the defendant of a fair trial and, in light of the overwhelming evidence of the defendant’s guilt, should be considered harmless (see, People v Jimenez, 79 AD2d 1012, mod on other grounds 55 NY2d 895; cf., People v Bannerman, 110 AD2d 706; People v Evans, 88 AD2d 604). Thompson, J. P., Spatt, Sullivan and Harwood, JJ., concur.