In a habeas corpus proceeding, relator appeals from a judgment of the Supreme Court, Dutchess County, dated March 9, 1966, which dismissed the writ and remanded him to respondent’s custody. Judgment affirmed, without costs. Relator was convicted in 1958, upon his plea of guilty, of the crime of possession of narcotics and was sentenced as a second felony offender. He contends that (1) the trial court failed to inform him, pursuant to former section 335-b of the Code of Criminal Procedure (renumbered § 335-c [L. 1967, ch. 783, § 2]), that any prior convictions may subject him to different or additional punishment and (2) the denial of his request for counsel vitiates the proceeding held on the return of the writ. Prior to 1957, an indictment was permitted to contain allegations concerning previous convictions of a defendant which might expose him to additional punishment. Section 275-b of the Code of Criminal Procedure, enacted in 1957, prohibits reference to prior convictions in the indictment. In 1959, section 335-b was enacted to correct this lack of notice or warning (People v. Fuller, 45 Mise 2d 303, 307; 1959 Report of N. Y. Law Rev. Comm., pp. 489-506 [N. Y. Legis. Doe., 1959, No. 65 (M)]). In our opinion, since section 335-b granted a new right to defendants in criminal eases, the statute may not be applied retroactively (see, People ex rel. Sehlesinger v. Fay, 19 A D 2d 632; People v. Fink, 20 A D 2d 935, affd. 15 N Y 2d 679, cert. den. 381 U. S. 906; People v. Fuller, supra; People v. Farda, 36 Mise 2d 44). Consequently, relator’s petition lacks any justiciable basis upon which a writ of habeas corpus may be sustained. Absent any allegation in the petition to justify the assignment of counsel, no error was committed by the court’s refusal in this regard (People ex rel. Williams v. La Vallee, 19 N Y 2d 238; People ex rel. Visconti v. McMann, 28 A D 2d 1012; People v. Darling, 54 Mise 2d 442; see, also, People ex rel. Garcia v. Warden, 28 A D 2d 682; People ex rel. Faddy v. Wilkins, 27 A D 2d 984). Moreover, even if the refusal to assign counsel was error, such error would be harm1 ess, since no hearing was warranted in any event (People ex rel. Hardeman v. McMann, 26 A D 2d 864). Beldock, P. J., Brennan, Hopkins, Munder and Martuscello, JJ., concur.