—Appeal from a judgment of the Supreme Court (Malone, Jr., J.), entered November 30, 2001 in Albany County, which dismissed petitioner’s application, in a proceeding pursuant to CPLR article 78, to review a determination of respondent withholding petitioner’s good time allowance.
When petitioner commenced this proceeding, he was serving a prison term of 21/s to 7 years, a sentence imposed pursuant *712to the terms of a plea bargain agreement* where petitioner had pleaded guilty to one count of the crime of burglary in the third degree in full satisfaction of two multicount indictments. In the first indictment, petitioner was charged with 22 crimes including rape, sexual abuse, sodomy and endangering the welfare of a child based upon allegations that during the time when he was residing with his former girlfriend, he had committed sexual acts with her two daughters, aged 9 and 13 at the time. The second indictment, containing five counts, arose out of events that took place shortly after petitioner had moved out of his girlfriend’s residence, i.e., petitioner allegedly broke into the residence, perpetrating various acts of vandalism and taking an assortment of personal property.
During the term of incarceration that followed petitioner’s conviction, he refused to participate in the correctional facility’s treatment program for sex offenders on the ground that he had not been convicted of a crime involving sexual misconduct. In addition, he had never admitted committing any unlawful or inappropriate sexual acts with the alleged victims. Nonetheless, his failure to participate in the treatment program resulted in a recommendation by the Time Allowance Committee that petitioner’s two years and four months of good time should be withheld, subject to possible restoration upon his completion of six months in the treatment program. This recommendation was administratively affirmed. Petitioner then commenced this CPLR article 78 proceeding, which resulted in Supreme Court’s judgment dismissing his application.
We affirm. Good behavior allowances are a privilege “and no inmate has the right to demand or to require that any good behavior allowance be granted” (7 NYCRR 260.2). The decision of whether to grant or withhold allowance time is discretionary, based upon a review of the inmate’s entire institutional record (see Matter of Amato v Ward, 41 NY2d 469, 473; Matter of Jones v Coombe, 269 AD2d 632, lv denied 95 NY2d 755). So long as the decision is made in accordance with law, it is not subject to judicial review (see Correction Law § 803 [4]; see also Matter of Coleman v Boyle, 270 AD2d 739, lv denied 95 NY2d 758).
In the instant matter, the decision to withhold petitioner’s allowance time had a rational basis in the record, i.e., the unchallenged presentence report indicated that he had performed sexual acts with two children under the age of 14. *713While petitioner’s denial of such criminal behavior was a part of the presentence report, the report also contained petitioner’s description of himself as a person with a lot of emotional problems, including the acknowledgment that he had been sexually abused as a child. In addition, the crime of which petitioner was convicted, burglary in the third degree, had an element of sexual misconduct underlying it (see Matter of Ferry v Goord, 268 AD2d 720, 721, lv denied 94 NY2d 763), e.g., when petitioner burglarized the residence of the children whom he was accused of molesting, he left a pornographic magazine in the girls’ bunkbed. Based upon this record, we find that the decision to withhold petitioner’s good time allowance was not contrary to law and it had a rational basis in his failure to participate in a program designed to treat the type of behavior that led to his conviction and imprisonment (see Matter of Lamberty v Schriver, 277 AD2d 527, 528). Hence, the judgment of Supreme Court dismissing petitioner’s application will not be disturbed.
Cardona, P.J., Mercure, Carpinello, Lahtinen and Kane, JJ., concur. Ordered that the judgment is affirmed, without costs.