Appeal from a judgment of the County Court of Tompkins County, rendered February 9, 1976, convicting defendant, upon his plea of guilty, of the crime of rape in the first degree and sentencing him, as a second felony offender, to an indeterminate term of imprisonment with a maximum of 25 years and a minimum of 12 years 6 months. Indicted on six counts of rape in the first degree, four counts of kidnapping in the second degree, and one count of criminal solicitation in the first degree, defendant pleaded guilty to one of the rape counts in full satisfaction of the indictment and was thereafter sentenced, as a second felony offender, to an indeterminate term of imprisonment of 12 1/2 to 25 years. Arguing that he was improperly adjudged a second felony offender, he now appeals to this court and asks that his cause be remanded for resentencing before a different judge. We find that the judgment appealed from must be affirmed. From the record it is clear that defendant, following consultation with his attorney on the matter, freely admitted his prior felony conviction after the sentencing court had carefully explained and emphasized the significance of his being ruled a second felony offender. Moreover, both defendant and his attorney and the prosecution agreed that he should be sentenced in accordance with section 70.06 of the Penal Law, and his status as a second felony offender was not a contested issue at the time of sentencing. Under such circumstances, there was plainly substantial compliance with CPL 400.21 (cf. People v Bryant, 47 AD2d 51), and the fact that the sentencing court did not expressly advise defendant of his right to contest the constitutional basis of his prior conviction does not warrant our disturbance of the sentence imposed. As for defendant’s remaining contentions, they are likewise without merit. He presents nothing of substance to support his claim that he was denied the effective assistance of counsel, and, as required by CPL 380.50, he was permitted to make a statement before the court pronounced sentence. Judgment affirmed. Koreman, P. J., Sweeney, Kane, Mahoney and Main, JJ., concur.