CONCURRING OPINION BY
Judge PELLEGRINI.While I agree with the majority that Jerald Sturgis (Sturgis) should be given credit in excess of the maximum time served on his 1987 sentence, I write separately because I do not agree with its holding that an executive branch agency can decide not to follow a sentencing order if it believes it is illegal. By so holding, the majority does not seem to realize that orders are orders, not suggestions. Until a court with jurisdiction over the matter decides to revoke or amend the order, the agency is required to carry it out as written, not as it believes it should have been written.
In arriving at this conclusion, the majority relies on Fajohn v. Department of Corrections, 547 Pa. 649, 692 A.2d 1067 (1997), to support its view that the Department of Corrections (Department) contends that mandamus cannot be used to compel the Department to honor a valid order that it believes is illegal. However, as explained by subsequent Supreme Court decisions, Fajohn does not say what the majority says its says. In McCray v. Pennsylvania Department of Corrections, 582 Pa. 440, 450, 872 A.2d 1127, 1133 (2005), our Supreme Court held:
The Department is an executive branch agency that is charged with faithfully implementing sentences imposed by the courts. As part of the executive branch, the Department lacks the power to adjudicate the legality of a sentence or to add or delete sentencing conditions.
Simply put, our Supreme Court held that the Department must carry out sentences as written.
Fajohn’s meaning was addressed directly in Hunt v. Pennsylvania State Police, 603 Pa. 156, 983 A.2d 627 (2009). In that case, the state police, taking the position adopted by the majority here, contended *1228that Fajohn stands for the proposition that governmental entities may refuse to follow court orders when such orders are illegal, regardless of the mechanism by which the issue is raised, especially when the respondent-agency is not the petitioning party. Addressing that argument, our Supreme Court stated:
In Fajohn, Dominic Fajohn brought an action in mandamus to compel the Department of Corrections to apply credit for a certain period of time in the imposition of his sentence. The Department of Corrections refused to apply credit on the grounds that it violated Pa.R.Crim.P. 1406(c) (concerning imprisonment for other offenses). The Commonwealth Court sustained the Commonwealth’s preliminary objections and Fajohn appealed. Our Court found mandamus was not available to compel the relief Fajohn sought, but, rather, held the proper avenue for relief was in an application for resentencing with the trial court.
The State Police’s reliance upon Fa-john is misplaced. First, unlike in this appeal, the issue of a governmental entity’s standing to refuse to comply with a trial court’s order was not at issue in Fajohn. In fact, standing is not mentioned in the opinion. Second, the Fa-john Court was not addressing a matter that arose under CHRIA,[1] but rather, a sentencing matter. Third, and related thereto, our Court unmistakably held in J.H. [Commonwealth v. J.H., 563 Pa. 248, 759 A.2d 1269 (2000)], decided three years after Fajohn that “standing is not conferred via a party’s relationship to the proceedings.” J.H., 568 Pa. at 253, 759 A.2d at 1271. Thus, if the State Police has no standing to challenge an application for expungement before the trial court, 18 Pa.C.S.A. § 9122, and it has no standing to challenge such an order in the context of a motion to compel before our common pleas courts, J.H., then it follows that it does not have standing to challenge the legality of the expungement order in the context of preliminary objections filed in a petition for review for mandamus. In a mandamus proceeding, the State Police is a respondent only in its role as the central repository, and may not challenge the underlying legality of the expungement order. Indeed, to give the State Police standing to raise preliminary objections in a mandamus action in order to challenge the legality of an expungement order would be to permit it to do collaterally what it could not do directly. As we have made plain, the State Police is not aggrieved “either by the order to expunge [Hunt’s] criminal record, or by the order compelling it to expunge the same records.” J.H., 563 Pa. at 253, 759 A.2d at 1271-72. Thus, our earlier decision in Fajohn does not compel a different result in this appeal.[14]
In footnote 14, the Supreme Court went on to state that:
Similarly, the State Police’s arguments that, based upon its role as the central repository, it is aggrieved because it would be prevented from retaining the record of a sexual offender whose victims were minors and that, potentially, Hunt could commit other crimes and impermissibly seek ARD were rejected by this same conclusion in J.H. that the State Police performed ministerial duties and was not aggrieved by an order compelling it to expunge records. Id.
603 Pa. at 172, 983 A.2d at 636.
To parrot the Supreme Court’s reasoning above, if the Department has no *1229standing to challenge the sentencing order before the trial court, it then follows that it does not have standing to challenge the legality of the sentencing order in the context of preliminary objections filed in a petition for review for mandamus. In a mandamus proceeding, the Department is a respondent only in its role as the “repository” of the prisoner, and may not challenge the underlying legality of the sentencing order. Indeed, to give the Department standing to raise preliminary objections in a mandamus action in order to challenge the legality of a sentencing order would be to permit it to do collaterally what it could not do directly. The Department is not aggrieved by carrying out an order that was unappealed by the entity charged with protecting the public interest, the district attorney. Thus, the Supreme Court decision in Fajohn does not allow the Department to use the purported illegality of the order as a defense to a mandamus action.
The danger of the majority’s approach is obvious from what occurred here. The Department changed or attempted to change every sentencing order that the courts ordered it to carry out. Sturgis’ 1987 sentencing order was for a term of incarceration of not less than five years nor more than five years; in other words, a flat five-year sentence. The Department, or more accurately some clerk in the Department, erroneously believed that the sentence should have been not less than five but more than ten years and required Sturgis to serve five more years than he was sentenced to serve. In 1995, Sturgis was sentenced to a prison term of 15 to 30 years that no one contends was illegal, and the Department proposed to reduce the maximum date from 30 years to 25 years to make up the five years that it illegally required Sturgis to serve. No matter if it believes an order requires the prisoner to serve more time or less time than the law allows, the Department has no authority to change an order to carry out what it believes that order should say or what it believes justice may require.
To allow an executive branch agency to change orders that extend or shorten the term of the sentencing order is beyond its powers. More importantly, to allow agencies not to enforce orders as written because they believe an order did not follow the law violates the litigant’s due process and lessens the effect of judicial orders by allowing agencies to play “catch me if you can” with litigants and courts. Because the majority sanctions such conduct, I concur in the result only.
. Criminal History Record Information Act, 18 Pa.C.S. § 9183.