
    The People of the State of New York ex rel. Rachel Goldberg, on Behalf of Bart Roman, Appellant, v Allyn Sielaff, as Commissioner of the New York City Department of Correction, Respondent.
   Judgment of the Supreme Court, New York County (Brenda Soloff, J.), entered September 12, 1991, which dismissed petitioner’s writ of habeas corpus seeking his release pursuant to CPL 180.80 on the ground that the indictment obtained was invalid, unanimously affirmed, without costs.

Petitioner was arrested on August 29, 1991, and arraigned the following day on a felony complaint charging him with second degree robbery. At arraignment, petitioner served written notice of his intention to testify before the Grand Jury, in compliance with CPL 190.50 (5) (a). Petitioner was unable to make bail and remained incarcerated until September 4, 1991, the date set for his Grand Jury appearance, and, unless a hearing was held or Grand Jury action taken, the date on which he would be entitled to be released pursuant to CPL 180.80. In the late afternoon on that date, by which time petitioner was not produced by the Department of Correction, the prosecutor presented the People’s evidence to the Grand Jury and filed a certificate of affirmative Grand Jury action with the court. Petitioner’s request to be released pursuant to CPL 180.80 was denied and this writ was then brought.

The purpose of CPL 180.80 is to ensure that the defendant is not detained beyond the prescribed period of time without a finding of probable cause. Here, the prosecutor attempted to honor petitioner’s request to testify, and refrained from presenting the People’s case or seeking a vote in the Grand Jury until it became clear that petitioner was not going to be produced. Only at that point, in order to satisfy the requirements of CPL 180.80, did the prosecutor proceed to obtain an indictment. Thereafter, petitioner was not entitled to be released pursuant to CPL 180.80. Rather his remedy to cure the defect in the indictment, due to his nonappearance, was to move for dismissal of the indictment, as specifically provided in CPL 210.20 (1) (c) and 210.35 (4) (and see, CPL 210.45 [9]). Concur—Sullivan, J. P., Milonas, Ellerin, Kassal and Smith, JJ.  