Order, Supreme Court, New York County (Charles H. Solomon, J.), entered on or about January 26, 2010, which denied defendant’s CPL 440.46 motion for resentencing, unanimously affirmed.
The court met its statutory obligation to “offer an opportunity for a hearing and bring the applicant before it” (CPL 440.46 [3] [incorporating by reference provisions of 2004 Drug Law Reform Act (L 2004, ch 738, § 23)]) when defendant was “brought before the court and given an opportunity to be heard” (see People v Soler, 45 AD3d 499 [2007], lv denied 9 NY3d 1009 [2007]). Where the critical facts are uncontested, that is all the statute requires (see People v Burgos, 44 AD3d 387 [2007], lv denied 9 NY3d 990 [2007]).
The court properly exercised its discretion in determining *415that substantial justice dictated denial of the application with regard to defendant’s February 2005 conviction of criminal sale of a controlled substance in the third degree. The court properly considered the totality of circumstances, including defendant’s very extensive criminal record, the substantial quantities of drugs and cash involved in his drug selling activities, his unfavorable prison disciplinary record, and his multiple failures to appear in court (see e.g. People v Aguirre, 47 AD3d 489 [2008], lv denied 10 NY3d 761 [2008]).
The court properly found defendant ineligible for resentencing as to his January 2005 conviction of fifth-degree criminal sale of a controlled substance, a class D felony. GPL 440.46 (2) authorizes resentencing on a class C, D, or E drug felony where the sentence for such an offense was “imposed by the sentencing court at the same time or [was] included in the same order of commitment as such class B felony.” Defendant’s class D drug felony was the subject of a separate indictment, a separate sentencing proceeding, and a separate commitment order from his class B felony. Contrary to defendant’s argument, the indication, in the commitment order for the B felony, that the sentence was to run concurrently with the previously imposed sentence for the D felony did not bring the latter sentence within the ambit of the statute. The statutory language plainly applies where a defendant is actually committed to custody on a lower level drug felony in the same order that commits him to custody on a B felony, not where an offense for which the defendant has previously been sentenced and committed is merely referenced in the later order. Concur — Andrias, J.P, Sweeny, Moskowitz, Renwick, Richter, JJ.