Appeal from a judgment of the Erie County Court (Michael F. Pietruszka, J), rendered July 30, 2003. The judgment convicted defendant, upon his plea of guilty, of burglary in the second degree.
*1357It is hereby ordered that the judgment so appealed from be and the same hereby is unanimously modified as a matter of discretion in the interest of justice and on the law by vacating the sentence and as modified the judgment is affirmed, and the matter is remitted to Erie County Court for further proceedings in accordance with thefollowing memorandum: Defendant appeals from a judgment convicting him, upon his plea of guilty, of burglary in the second degree (Penal Law § 140.25 [2]). Although defendant failed to preserve for our review his contention that County Court erred in enhancing the sentence by imposing restitution at sentencing without affording him the opportunity to withdraw his plea (see People v Therrien, 12 AD3d 1045, 1046 [2004]; People v Delair, 6 AD3d 1152 [2004]), we nevertheless exercise our power to review that contention as a matter of discretion in the interest of justice (see CPL 470.15 [6] [a]; People v Cooke, 21 AD3d 1339 [2005]). Here, as in the case of defendant’s codefendant (Cooke, 21 AD3d 1339 [2005]), we conclude that, because restitution was not part of the plea agreement, the court should have afforded defendant the opportunity to withdraw his plea before ordering him to pay restitution (see Therrien, 12 AD3d at 1046; Delair, 6 AD3d at 1152; People v Harrington, 3 AD3d 737, 738-739 [2004]). In addition, although defendant failed to preserve for our review his contention that the court erred in relying exclusively upon the victim impact statement attached to the presentence report in determining the amount of restitution (see Therrien, 12 AD3d at 1046), we nevertheless further exercise our power to review that contention as a matter of discretion in the interest of justice, and we conclude that the court erred in failing to conduct a hearing to determine the amount of restitution (see Cooke, 21 AD3d at 1339; Therrien, 12 AD3d at 1046). We therefore modify the judgment by vacating the sentence, and we remit the matter to County Court to impose the promised sentence or to afford defendant the opportunity to withdraw his plea. Present—Pigott, Jr., P.J., Green, Kehoe, Martoche and Lawton, JJ.