
    The People of the State of New York, Respondent, v Gary D. Johns, Jr., Appellant.
    [700 NYS2d 267]
   —Carpinello, J.

Appeal from a judgment of the County Court of Cortland County (Avery, Jr., J.), rendered February 25, 1999, convicting defendant upon his plea of guilty of the crime of attempted rape in the first degree.

In satisfaction of a charge of rape in the first degree, a class B violent felony, defendant entered a plea of guilty of attempted rape in the first degree, a class C violent felony, with the understanding that he would be sentenced to a determinate prison term of 5¥2 years. Defendant was sentenced as agreed and he executed a waiver of the right to appeal. He now appeals, challenging the sentence.

While defendant’s unlimited waiver of the right to appeal does not foreclose a challenge to the legality of the sentence, it does encompass a challenge to the sentence as harsh and excessive (see, People v Hidalgo, 91 NY2d 733). Defendant’s sentence was clearly authorized (see, Penal Law § 70.02 [2] [a]; [3] [b]) and he claims only that it is harsh and excessive. The issue, therefore, has not been preserved for our review.

In any event, defendant was permitted to plead to a class C violent felony in satisfaction of the pending class B violent felony charge and the allocution indicates that defendant committed the greater crime. In addition, the SVa-year prison term was considerably less than the 15-year maximum possible term for a class C violent felony (see, Penal Law § 70.02 [3] [b]). Accordingly, despite defendant’s youth and lack of a criminal record, there is no basis to disturb the sentence even if defendant’s challenge had not been encompassed by his waiver of the right to appeal.

Her cure, J. P., Crew III, Spain and Mugglin, JJ., concur. Ordered that the judgment is affirmed.  