*174Judgment, Supreme Court, New York County (Arlene Silver-man, J), rendered October 10, 2002, convicting defendant, after a jury trial, of criminal possession of a controlled substance in the fifth degree, and sentencing him, as a second felony offender, to a term of 3 to 6 years, unanimously affirmed.
The court’s Sandoval ruling balanced the appropriate factors and was a proper exercise of discretion (see People v Hayes, 97 NY2d 203 [2002]; People v Walker, 83 NY2d 455, 458-459 [1994]; People v Pavao, 59 NY2d 282, 292 [1983]). The court properly permitted elicitation of matters that were highly relevant to defendant’s credibility and were not unduly prejudicial.
While the court’s participation in examining witnesses was quite extensive, the court did not take on either the function or appearance of an advocate, or suggest to the jury that it had an opinion on the merits. Accordingly, defendant was not deprived of a fair trial (see People v Robinson, 3 AD3d 404 [2004]).
Defendant was not deprived of his right to present a defense and to confront the witnesses against him when the court properly exercised its discretion to preclude cross-examination on matters of questionable relevance (see Delaware v Van Arsdall, 475 US 673, 678-679 [1986]). In particular, defendant did not establish the relevance of inquiry into police procedures in observation sale cases, where in this case the police were not operating from an observation post, but instead were traveling by car when they happened upon drug activity. Concur— Nardelli, J.P., Tom, Ellerin, Williams and Lerner, JJ.