
760 N.E.2d 1009 (2001)
326 Ill. App.3d 450
260 Ill.Dec. 236
Todd S. HOWELL, Plaintiff-Appellant,
v.
Donald N. SNYDER, Jr., Director of the Illinois Department of Corrections, and Raymond Bensko, Jr., Warden of Jacksonville Correctional Center, Defendants-Appellees.
No. 4-01-0515.
Appellate Court of Illinois, Fourth District.
December 5, 2001.
Rehearing Denied January 14, 2002.
*1010 Robert I. Auler, Auler Law Offices, P.C., Urbana, for Todd Howell.
James E. Ryan, Attorney General, Joel D. Bertocchi, Solicitor General, Bryan J. Rose, Assistant Attorney General, Chicago, for Donald N. Snyder, Jr.
Justice COOK delivered the opinion of the court:
Plaintiff, Todd S. Howell, is serving a 4½-year sentence in the Department of Corrections (DOC). Defendant, Donald N. Snyder, Jr. (Director), is the Director of the DOC. Plaintiff filed a petition for an order of mandamus in connection with the Director's refusal to award him meritorious good-time credit. 730 ILCS 5/3-6-3(a)(3) (West 2000). The trial court granted the Director's motion to dismiss. In the unusual circumstances of this case, we conclude that mandamus does lie, and we reverse and remand.

I. BACKGROUND
Plaintiff alleges that the Director has imposed an unwritten policy of denying meritorious good time to any inmate who enters DOC with a prior charge or conviction for domestic battery or a pending order of protection. Plaintiff supported that allegation with the deposition of Judie Egelhoff, DOC Transfer Coordinator, in which she admitted the existence of the policy, and an article in the Illinois State Bar Association (ISBA) Criminal Justice newsletter Section Council hears from George E. DeTella, Associate Director of the Department of Corrections, Vol. 43, No. 10 Criminal Justice (ISBA Springfield, Illinois) June 2000, at 7-8 by Donald R. Parkinson reporting on an appearance before the Criminal Justice Section Council of the ISBA by George DeTella, associate director of DOC, in which he "outlined the repercussions for a defendant who enters DOC with either a prior charge or conviction for domestic battery or a pending order of protection. That inmate will probably not receive meritorious good time." The Director does not deny the existence of the policy, although he complains that plaintiff has failed to allege facts sufficient to show the existence of such a policy. The trial court agreed. This appeal followed.

II. ANALYSIS
Mandamus is an extraordinary remedy. An order of mandamus will not lie to direct the manner of performance of an action which requires the exercise of discretion. Although mandamus may not be used to direct or alter the manner in which discretion is to be exercised, it may be used to compel a public official to in fact exercise the discretion that he possesses. Freeman v. Lane, 129 Ill.App.3d 1061, 1063, 85 Ill.Dec. 216, 473 N.E.2d 584, 585-86 (1985). Freeman was not a case where *1011 mandamus was used to compel the exercise of discretion. In Freeman, it was alleged that the director had surrendered his discretion and established a policy of regularly crediting good time to inmates who presented little or no disciplinary problem. The plaintiff in Freeman alleged that the director had not followed that policy in his case and had not given him any credit. On those facts, Freeman held a claim for mandamus relief had been stated, because there was no discretion, because the facts "indicate that the discretion vested with the director by law has been transformed, de facto, into a nondiscretionary policy for awarding good[-]time credit." Freeman, 129 Ill.App.3d at 1064, 85 Ill.Dec. 216, 473 N.E.2d at 586.
The Director properly distinguishes Freeman with the argument that, in the present case, there is no policy of awarding meritorious good-time credit; instead, there is a policy of denying meritorious good-time credit. "To the extent the Director has given up his discretion in this case, it was only the discretion to award good[-]conduct credit to those with a past history of domestic violence." Plaintiff cannot logically complain that the Director has not followed a policy of denying credit. A policy of denying credit, however, may give rise to a claim for mandamus where it amounts to a refusal to exercise discretion. Mandamus may be used to compel the Director to exercise his discretion. Crump v. Illinois Prisoner Review Board, 181 Ill.App.3d 58, 62, 129 Ill.Dec. 825, 536 N.E.2d 875, 878 (1989).
A decision to grant or deny mandamus will be reversed on appeal only when it is against the manifest weight of the evidence. People ex rel. Braver v. Washington, 311 Ill.App.3d 179, 186, 243 Ill.Dec. 759, 724 N.E.2d 68, 73 (1999), appeal denied, 188 Ill.2d 581, 246 Ill.Dec. 130, 729 N.E.2d 503 (2000); Crump, 181 Ill. App.3d at 60, 129 Ill.Dec. 825, 536 N.E.2d at 877 (abuse of discretion). We review de novo, however, the granting of a motion to dismiss a petition for mandamus. Neade v. Portes, 193 Ill.2d 433, 439, 250 Ill.Dec. 733, 739 N.E.2d 496, 500 (2000); Freeman, 129 Ill.App.3d at 1063, 85 Ill.Dec. 216, 473 N.E.2d at 586.
We disagree with plaintiff's argument that the Director may not establish and follow policies in deciding questions of good-time credit, that the Director must "consider the individual record of the inmate" (emphasis in original), and that an "automatic disqualification of any individual, without examination of the individual record as a whole[,] does not equate to discretion" (emphasis in original). We agree with the trial court that the application of a policy "across the board" does not transform it into a nondiscretionary policy. The Director need not start from scratch with each request for good-time credit. The Director may attempt to treat similar cases similarly and develop policies to achieve that end. Particular misconduct may be deemed so serious as to warrant denial of good-time credit in almost every case. Examples include convicts who "are smuggling dope into the institution" or who "have attacked a guard with a shiv." Braver, 311 Ill.App.3d at 193, 243 Ill.Dec. 759, 724 N.E.2d at 78 (Greiman, J., dissenting).
Although the Director may utilize policies, his ability to do so is not unlimited. A policy of denying good-time credit to convicts who played basketball in high school, for example, would raise serious questions. The application of a particular policy must be rationally related to the furtherance of a legitimate governmental interest to comply with the requirements of equal protection. Braver, 311 Ill.App.3d at 190, 243 Ill.Dec. 759, 724 *1012 N.E.2d at 76-77 (requiring an inmate to spend at least 60 days in DOC custody before receiving good-time credit is rationally related to legitimate government interests). The question in this case is whether the Director's policy of denying good-time credit to those who have been charged with domestic battery is authorized by the governing statutes.
Section 3-6-3 of the Unified Code of Corrections deals with "early release on account of good conduct of persons committed to" DOC. 730 ILCS 5/3-6-3(a)(1) (West 2000). It seems clear that the conduct to be considered is conduct during incarceration. The section goes on to bar or limit early release for those convicted of certain crimes (not including domestic battery), similar to what the legislature does when it prescribes penalties for various offenses. The section provides for an increase of good-conduct credit for inmates engaged in substance-abuse programs, DOC assignments, or educational programs. The section provides for revocation or reduction of good-time credit "for specific rule violations, during imprisonment." 730 ILCS 5/3-6-3(c) (West 2000). Finally, the section provides for revocation or reduction of good-time credit for prisoners filing frivolous lawsuits against DOC or others. 730 ILCS 5/3-6-3(d) (West 2000). DOC rules and regulations similarly focus on conduct while incarcerated and provide no specific reference to conduct prior to incarceration, other than listing the offenses for which the legislature provided that no credit, or reduced credit, may be allowed. 20 Ill. Adm.Code § 107.210 (1996).
The statute logically assigns to the Director the task of determining matters within his purview, the conduct of the prisoner while the prisoner is confined to DOC. No reason exists to interpret the statute to expand that purview to events occurring prior to the prisoner's confinement. The prisoner's conduct prior to confinement has already been considered by the trial court in sentencing. The legislature has listed in some detail the offenses that warrant a denial or restriction of good-time credit. We perceive no suggestion in the statute that the Director may add to that list, nor is there any suggestion in this case that the Director's policy is required to promote some interest or activity of DOC.

III. CONCLUSION
We conclude that the Director's unwritten policy violates the statute, and accordingly the Director's application of the policy constitutes a refusal to exercise discretion for which mandamus would lie. We reverse the judgment of the trial court granting the Director's motion to dismiss. We remand for further proceedings in accordance with this opinion.
Reversed and remanded with directions.
TURNER and STEIGMANN, JJ., concur.
