#### The People of the State of New York, Respondent, v Fortunato Chiofalo, Appellant.

Appeal by defendant from two judgments of the County Court, Suffolk County, both rendered October 13, 1978, convicting him of attempted burglary in the third degree and grand larceny in the third degree, upon a plea of guilty, and imposing sentence. Judgments affirmed. Defendant was returned to New York from California on March 3, 1978, pursuant to CPL 580.20 (art 4)—the Agreement on Detainers—to stand trial on two indictments charging him, among other counts, with burglary in the third degree. Subdivision (c) of article 4 requires that a defendant be brought to trial in the receiving State within 120 days of his arrival in that State. Defendant’s trial, on that basis, should have been held by July 3, 1978. On March 29, 1978, however, defendant made an omnibus motion, returnable April 12. The People responded on May 2. The decision on the motion was made May 12, 1978. Towards the end of June, 1978 the prosecutor obtained an order, pursuant to CPL 580.20 (art 4, subd [c]), for good cause shown, permitting the People to continue the defendant in custody and to adjourn the matter until July 31, 1978. Defendant petitioned for a writ of habeas corpus sometime after July 3, 1978, claiming a violation of the time limitation with respect to the commencement of his trial. Following a hearing the writ was denied. Defendant thereupon pleaded guilty to one count of each indictment and sentence was imposed. On appeal, defendant maintains that he was not brought to trial within the prescribed time limitation and that the indictments should be dismissed. We do not agree. Defendant was entitled to bring on his omnibus pretrial motion and to have it decided before he went to trial. Under that view, he was unable to stand trial pending a decision on the motion and the time period was tolled accordingly (see CPL 580.20, art 6, subd [a]). In calculating the time involved on the motion we are mindful that the prosecutor’s office was dilatory in its response and have taken such delay into account. We further note that a continuance for good cause shown was granted in June, 1978 and that this tolled the running of the statutory time period. Defendant’s trial was, therefore, within the statutory time limitation. The purpose of the detainer agreement in requiring a prompt trial on outstanding indictments is not to be thwarted by a defendant who might occasion delay and then attempt to obtain dismissal of the indictment on the basis of that delay (cf. *People v White, 33*AD2d 217; *People v Bernstein,*74 Misc 2d 714). On the other hand, the prosecution may not escape responsibility for delay caused by its office on the pretext that once a defendant embarks upon a course, all time periods involved—whether reasonable or not—are a defendant’s responsibility. In this instance the delay in responding to defendant’s motion did not result in a violation of the statutory time period contained in the Agreement on Detainers. However, the prosecutor’s office should be ever mindful of its responsibility to respond to a defendant’s motion in a timely manner in the future. O’Connor, J. P., Mangano, Rabin and Gibbons, JJ., concur.