
    The People of the State of New York, Respondent, v Lamont Ladson, Appellant.
    [817 NYS2d 722]
   Appeal from a judgment of the County Court of Rensselaer County (McGrath, J.), rendered September 10, 2004, convicting defendant upon his plea of guilty of the crime of criminal sale of a controlled substance in the fifth degree.

In satisfaction of an indictment charging him with criminal sale of a controlled substance in the third degree, defendant agreed to plead guilty to criminal sale of a controlled substance in the fifth degree and to waive his right to appeal. Under the terms of the plea agreement, he was to be sentenced as a second felony offender to 2xh to 5 years in prison. Prior to sentencing, County Court received a statement pursuant to CPL 400.21 indicating that defendant had been previously convicted of a felony on February 20, 1997. Based upon this statement, the court sentenced him as a second felony offender in accordance with the plea agreement. Defendant now appeals.

Defendant argues that he was illegally sentenced as a second felony offender because County Court did not comply with the requirements of CPL 400.21. Preliminarily, we note that inasmuch as this claim implicates the legality of the sentence, defendant is not precluded from raising it by his waiver of the right to appeal (see People v Turner, 26 AD3d 524, 525 [2006]; People v Dukes, 14 AD3d 732, 733 [2005], lv denied 4 NY3d 885 [2005]). Turning to the merits, defendant argues that County Court did not inquire if he wished to controvert the allegations contained in the second felony offender statement as required by CPL 400.21 (3). He makes no argument, however, challenging the validity of the prior conviction. A review of the sentencing transcript discloses that County Court read the statement and then asked defense counsel if his client acknowledged the prior conviction. Defendant responded that he did. Given defendant’s admission that he was the person convicted of the prior felony and the fact that he was given sufficient notice of and an opportunity to controvert the allegations made in the second felony offender statement, we find that there was substantial compliance with CPL 400.21 and that County Court’s failure to specifically ask defendant if he wished to controvert the allegations of the statement was a harmless oversight (see People v Booker, 280 AD2d 785, 786 [2001], lv denied 96 NY2d 916 [2001]; People v Mann, 258 AD2d 738, 739 [1999], lv denied 93 NY2d 900 [1999]).

Cardona, PJ., Spain, Mugglin, Rose and Kane, JJ., concur. Ordered that the judgment is affirmed.  