
    The People of the State of New York, Respondent, v Joseph Dorino, Appellant.
   — Appeal by the defendant from five judgments of the Supreme Court, Kings County (Corriero, J.), all rendered April 27, 1984, convicting him of burglary in the Second degree, under indictment No. 4217/83, burglary in the third degree (three counts) under indictments Nos. 5794/ 83, 6037/83 and 242/84, and attempted robbery in the first degree under indictment No. 665/84, upon his pleas of guilty, and imposing sentences.

Ordered that the judgments are modified, on the law, by vacating the sentences imposed; as so modified, the judgments are affirmed, and the matter is remitted to the Supreme Court, Kings County, for resentencing.

The defendant failed to preserve for appellate review his challenge to the sufficiency of his plea allocution for the crime of attempted robbery in the first degree (see, People v Pellegrino, 60 NY2d 636). Moreover, the defendant’s plea of guilty to a lesser crime under indictment No. .665/84 constituted a waiver of his right to challenge the factual basis of his plea (see, People v Pelchat, 62 NY2d 97; People v Kenny, 143 AD2d 945).

However we agree with the defendant’s contention that the sentences imposed must be vacated as a result of the sentencing court’s assertion that it had no discretion to impose any sentence other than that negotiated at the plea proceedings. In view of the court’s admitted failure “to perform its obligation to exercise its own independent discretion in imposing sentence based upon its review of all relevant factors (see, People v Farrar, 52 NY2d 302, 305) and not to simply treat the imposition of sentence as a ministerial function” (People v Martinez, 136 AD2d 745, 746), the sentences imposed must be vacated and the matter remitted for resentencing. In so doing, we do not pass upon the propriety of the sentences imposed. Mollen, P. J., Brown, Kunzeman, Weinstein and Kooper, JJ., concur.  