Appeal by defendant from a judgment of the Supreme Court, Kings County, rendered December 20, 1966 on resentence, which convicted him of robbery in the third degree, on a guilty plea, and sentenced him to Elmira Reformatory. Judgment reversed, on the law, and case remanded to the Criminal Term for resentence as hereinafter indicated. No questions of fact were considered on this appeal. On November 4, 1966 defendant pleaded guilty to third degree robbery and on December 19, 1966 was sentenced and committed to the Elmira Reception Center. His counsel was present at the pleading and the sentence. As defendant was over 21 years of age, he should have been sentenced to Elmira Reformatory and the commitment to the Reception Center was invalid (Penal Law, §§ 2184-a, 2185). On December 20, 1966, the day after that sentencing and commitment, the court remembered that defendant was over 21 and, realizing that the sentence was invalid, had defendant returned to the courtroom for resentence. Defendant’s attorney was not present. The court stated that it had inadvertently said “Elmira Reception Center” instead of “Elmira Reformatory ”, when passing sentence on December 19, that it was changing an illegal sentence to a legal one and that it was committing defendant to “Elmira Reformatory”. Defendant objected, saying that he wanted his attorney to be present while a new sentence was being passed, whereupon the court said his attorney had been contacted but could not come to court and it offered to assign a Legal Aid Society attorney, then in the courtroom, to represent him. Defendant said he preferred his own attorney and requested an adjournment until his attorney could be present. The court denied the request and committed him to Elmira Reformatory. In our opinion, it was improper for the court informally to “ change ” the invalid sentence in the absence of defendant’s attorney. The invalid first sentence should have been formally vacated and a new, proper sentence should have been imposed; and defendant was entitled to be represented by his own attorney at the resentence. Beldock, P. J., Christ, Brennan, Benjamin and Munder, JJ., concur.