Order, Supreme Court, New York County (Charles H. Solomon, J.), entered on or about May 11, 2010, which denied defendant’s CPL 440.46 motion for resentencing, unanimously affirmed.
Since no material facts were contested, the resentencing court was not required to conduct an evidentiary hearing (see People v Anonymous, 85 AD3d 414 [1st Dept 2011], lv denied 18 NY3d 922 [2012]). The court complied with the resentencing statute when defendant was “brought before the court and given an opportunity to be heard” (id. at 414). Giving a defendant an opportunity to be heard is mandatory, but the taking of testimony is not. Here, the court permitted defendant to make an extensive oral statement, and it considered written submissions from the witnesses whom defendant had sought to call. Defendant received a full opportunity to inform the court of factors supporting his resentencing motion.
The court properly exercised its discretion in concluding that substantial justice dictated denial of resentencing, given defendant’s very extensive history of felony convictions and parole violations, and his use of narcotics while in prison. These factors outweighed the favorable factors cited by defendant. Concur—Sweeny, J.P., Saxe, DeGrasse, Abdus-Salaam and Feinman, JJ.