
882 S.W.2d 471 (1994)
Ngai Van NGUYEN, Appellant,
v.
The STATE of Texas, Appellee.
No. 01-94-00098-CR.
Court of Appeals of Texas, Houston (1st Dist.).
August 4, 1994.
Rehearing Denied September 15, 1994.
Linda J. Nickelson, Bayou Vista, for appellant.
Michael J. Guarino, Denise V. Wilkerson, Galveston, for appellee.
Before OLIVER-PARROTT, C.J., and ANDELL and HEDGES, JJ.

OPINION
HEDGES, Justice.
Appellant Ngai Van Nguyen appeals the trial court's denial of his application for writ of habeas corpus requesting the trial court to dismiss the prosecution of his case with prejudice. We reverse.

Facts
Appellant was arrested on March 31, 1993, for theft by receiving stolen property, and the trial court set his bail at $2000. He was released on bond the same day. Although his arrest took place during the January term of the 56th District Court, Galveston County, he was not indicted during that term. The July term of the 56th District *472 Court ran from July 5, 1993 until January 3, 1994. Appellant was not indicted during the July term.
On December 22, 1993, appellant filed his petition for writ of habeas corpus and dismissal of prosecution with prejudice. The petition was heard by the trial court on January 5, 1994. As of that date, no indictment had been presented against appellant. On January 7, 1994, the trial court denied appellant's requested habeas corpus relief. He was indicted on January 26, 1994.

Habeas Corpus Relief
Preliminarily, we agree with appellant that habeas corpus is a proper remedy for appellant to challenge his confinement. Ex parte Robinson, 641 S.W.2d 552, 554 (Tex.Crim.App.1982) (habeas corpus relief available to defendant subject to conditions of bond because restrained in his liberty within the meaning of Tex.Code Crim.P.Ann. art. 11.01 (Vernon 1989)).

Dismissing the Prosecution
In points of error one and two, appellant contends that the trial court erred in denying habeas corpus relief by failing to dismiss the prosecution with prejudice under Tex.Code Crim.P.Ann. arts. 32.01 and 28.061 (Vernon 1989). Article 32.01 provides:
When a defendant has been detained in custody or held to bail for his appearance to answer any criminal accusation before the district court, the prosecution, unless otherwise ordered by the court, for good cause shown, supported by affidavit, shall be dismissed and the bail discharged, if indictment or information be not presented against such defendant at the next term of the court which is held after his commitment or admission to bail.
There is no dispute that appellant was not indicted within the time required by article 32.01, that is, at the next term of the 56th District Court held after his admission to bail. The State did not file any response to appellant's application for writ of habeas corpus. At the hearing, appellant's co-defendant testified regarding his arrest, bail, and bond. Although given the opportunity, the State did not attempt to contest appellant's application by showing good cause for failure to bring a timely indictment either at the hearing or by affidavit.
The State agrees that under a plain reading of the statute, appellant was entitled to a dismissal of his prosecution. The State contests, however, appellant's right to dismissal of his prosecution with prejudice under TEX. CODE CRIM.P.ANN. art. 28.061. Whether appellant is entitled to dismissal with prejudice is the disputed issue.

Has Article 28.061 been declared unconstitutional?
It is the State's contention that article 28.061 is void and therefore cannot be applied to prohibit future prosecution when an indictment is not timely brought. Article 28.061 was held unconstitutional by the Texas Court of Criminal Appeals in Meshell v. State, 739 S.W.2d 246, 257 (Tex.Crim.App. 1987). In Meshell, the court held that the Speedy Trial Act, Tex.Code Crim.P.Ann. art. 32A.02 (Vernon 1989), violated the separation of powers doctrine, Tex.Const. art. II, § 1. Id. The Speedy Trial Act was constitutionally infirm because it was not directed at providing procedural guidelines for the speedy commencement of trial. Id. at 255. Instead, the act was directed at "speeding the prosecutor's preparation and ultimate readiness for trial." Id. (emphasis in original).
Additionally, the Act failed to incorporate four factors the court found to be determinative whether a defendant's Sixth Amendment right to a speedy trial has been violated: the length of the delay before trial, the reason for the delay, the defendant's assertion of his right to a speedy trial, and any prejudice to a defendant resulting from that delay in trial. Meshell, 739 S.W.2d at 256. By omitting these factors, the court found that the Act seriously encroached upon the prosecutor's exclusive function without the authority of an express constitutional provision. Id. The court concluded that article 32A.02 as a whole was unconstitutional and rendered void. Id. The court held that because article 28.061 was passed as an enforcement vehicle for article 32A.02, article 28.061 was also unconstitutional and void. Id. at 258. *473 The State argues that Meshell is dispositive: appellant cannot depend on an unconstitutional statute to provide relief. See Ex parte Maddux, 757 S.W.2d 737, 738 (Tex.Crim. App.1988), cert. denied, 488 U.S. 1032, 109 S.Ct. 842, 102 L.Ed.2d 974 (1989).
Appellant counters that the legislative amendment to article 28.061, which became effective after the Texas Court of Criminal Appeals' decision in Meshell, makes article 28.061 a viable enforcement statute with regard to article 32.01. When Meshell was decided, article 28.061 read:
If a motion to set aside an indictment, information, or complaint for failure to provide a speedy trial as required by Article 32A.02 is sustained, the court shall discharge the defendant. A discharge under this article is a bar to any further prosecution for the offense discharged or for any other offense arising out of the same transaction.
The current version of article 28.061 provides:
If a motion to set aside an indictment, information, or complaint for failure to provide a speedy trial is sustained, the court shall discharge the defendant. A discharge under this article or Article 32.01 of this code is a bar to any further prosecution for the offense discharged and for any other offense arising out of the same transaction, other than an offense of a higher grade that the attorney representing the state and prosecuting the offense that was discharged does not have the primary duty to prosecute.
(Emphasis added.) The current version of article 28.061 became effective after Meshell, on September 1, 1987, and applies to the prosecution of an offense committed on or after the effective date.[1]
We agree with appellant that the amended version of article 28.061 survives Meshell as it applies to article 32.01. Article 28.061 was declared unconstitutional only in its capacity as an enforcement mechanism of the Speedy Trial Act. We believe that the Court of Criminal Appeals did not intend to void the statute independent of this role. Therefore, amended article 28.061 is still viable as an enforcement tool of article 32.01.[2]

Is Article 28.061 unconstitutional?
The State argues that if amended article 28.061 is still viable under Meshell as an enforcement mechanism for article 32.01, then it is unconstitutional and void under the reasoning of that case. We disagree.
We are well aware that "[a]ll statutes carry a presumption of validity." Vinson v. Burgess, 773 S.W.2d 263, 266 (Tex.1989). Measuring article 28.061 against the reasoning of Meshell, we find the State's argument wanting. The court wrote that "we find it obvious that the Legislature would not have passed Article 32A.02, § 1(1), supra, without including the enforcement mechanism of Article 28.061, supra. Therefore, we hold that Chapter 32A.02, in its entirety, and Article 28.061, supra, are rendered void." Meshell, 739 S.W.2d at 257-58. This language indicates that article 28.061 was declared void only as an appendage to the unconstitutional Speedy Trial Act. There is nothing in this statute that is inherently repugnant to constitutional dictates.
Having held that article 28.061 is constitutional, we find that the trial court erred in denying appellant's request for habeas corpus by failing to dismiss his prosecution with prejudice under articles 32.01 and 28.061.
We sustain points of error one and two.
Our disposition of these points makes consideration of appellant's other points of error unnecessary.
We reverse the judgment of the trial court and remand to the trial court with instructions to dismiss appellant's indictment with prejudice.
NOTES
[1]  Act approved June 17, 1987, 70th Leg., R.S., ch. 383, §§ 3, 4, 1987 Tex.Gen.Laws 1885, 1887.
[2]  We do not rule on the constitutionality of article 32.01 because that issue is not before us.
