
837 A.2d 652 (2003)
Carl M. SMITH, Petitioner,
v.
DEPARTMENT OF CORRECTIONS, Respondent.
Commonwealth Court of Pennsylvania.
Submitted on Briefs October 10, 2003.
Decided December 9, 2003.
*653 Carl M. Smith, petitioner, pro se.
Raymond W. Dorian, Camp Hill, for respondent.
BEFORE: FRIEDMAN, Judge, and COHN, Judge, and McCLOSKEY, Senior Judge.
OPINION BY Judge FRIEDMAN.
The Department of Corrections (Department) has filed preliminary objections in the nature of a demurrer to the petition for review (Petition) filed by Carl M. Smith (Smith) in this court's original jurisdiction.
Currently, Smith is a prisoner at the state correctional institution at Greene (SCI-Greene). Smith was arrested in December of 1978 and was found guilty of robbery and burglary, for which he served a sentence of ten to twenty years under DOC # AM-2447. In 1991, Smith began serving another sentence of eleven to twenty-two years under DOC # BQ-3684. (Petition, ¶ ¶ 1, 4, 15.)
In 1995, the legislature enacted the DNA Detection of Sexual and Violent Offenders Act (1995 DNA Act), Act of May 28, 1995, P.L. 1009, repealed by the Act of June 19, 2002, P.L. 394. Section 306(b) of the 1995 DNA Act provided as follows:
A person who has been convicted or adjudicated delinquent for a felony sex offense or other specified offense before the effective date of this section and who is still serving a term of confinement in connection therewith on the effective date of this section shall not be released in any manner prior to the expiration of his maximum term of confinement unless and until a DNA sample has been withdrawn.
Dial v. Vaughn, 733 A.2d 1, 3 (Pa.Cmwlth. 1999).
In 2002, the legislature repealed the 1995 DNA Act but amended the Judicial Code to provide for DNA testing of prisoners (2002 DNA Act). See sections 4701 to 4741 of the Judicial Code, 42 Pa.C.S. §§ 4701-4741. In the 2002 DNA Act, the legislature expanded the list of offenses for which DNA testing is mandated to include burglary and robbery. See section 4703 of the Judicial Code, 42 Pa.C.S. § 4703 (defining "other specified offense"). The legislature also amended the former section *654 306(b), now section 4716(b) of the Judicial Code, to state:
(1) A person who has been convicted or adjudicated delinquent for a felony sex offense or other specified offense and who serves a term of confinement in connection therewith on or after the effective date of this chapter [Chapter 47] shall not be released in any manner unless and until a DNA sample has been withdrawn.
(2) This chapter shall apply to incarcerated persons convicted or adjudicated delinquent for a felony sex offense prior to the effective date of this chapter.
42 Pa.C.S. § 4716(b) (emphasis added).
Since the enactment of the 2002 DNA Act, the Department has sought a DNA sample from Smith. The Department advised Smith that, if he refuses to provide a DNA sample willingly, the Department will take a sample by physical force and then place Smith in the restricted housing unit.
Smith filed his Petition with this court, seeking an order enjoining the Department from taking a DNA sample from him. The Department has filed preliminary objections in the nature of a demurrer.
In considering the Department's preliminary objections, we must accept as true all well-pleaded facts set forth in the Petition and all reasonable inferences that may be drawn from those facts. Commonwealth ex rel. Smith v. Pennsylvania Department of Corrections, 829 A.2d 788 (Pa. Cmwlth.2003). We should sustain preliminary objections only in cases that are clear and free from doubt as to whether the well-pleaded facts are legally sufficient to establish a right to relief. Id.
Here, Smith was arrested in 1978 for burglary and robbery and served a ten-to-twenty-year sentence for those offenses. Smith's maximum term expired in 1998. Currently, Smith is serving eleven to twenty-two years for some unknown offense.
Section 4716(b) of the Judicial Code authorizes the taking of a DNA sample only when a person has been convicted of a specified offense and the person is confined in connection with that offense on or after December 16, 2002, the effective date of the amended statute. Thus, because Smith's sentence for burglary and robbery expired in 1998, the Department is not authorized to take a DNA sample from Smith.[1] The Department is authorized to take a DNA sample from Smith only if the underlying offense for Smith's current sentence of eleven to twenty-two years is a specified offense, something we do not know at this time.
Accordingly, we overrule the Department's preliminary objections in the nature of a demurrer.

ORDER
AND NOW, this 9th day of December, 2003, upon consideration of the preliminary objections of the Pennsylvania Department of Corrections, it is hereby ordered that the preliminary objections are overruled. The Pennsylvania Department of Corrections shall file an answer to the petition for review within thirty (30) days of the date of this order.
NOTES
[1]  The Department does not argue in its brief that it seeks a DNA sample from Smith based on the underlying offense for Smith's current sentence. At this preliminary stage in the proceedings, we must conclude that the Department is seeking a DNA sample from Smith based on Smith's expired sentence for burglary and robbery.
