The plaintiff, an inmate lawfully in the custody of the Department of Correction, brought this action in the Superior Court seeking a declaration that he is entitled to certain “earned good time” (EGT) credits.1 He appeals from a judgment dismissing his complaint after allowance of the defendant’s summary judgment motion. We affirm.2
*691The following facts are uncontroverted. On July 20, 1988, the plaintiff was paroled after serving five years and two months of a seven to fifteen year sentence for armed robbery (the “A” sentence). His parole was revoked on November 28, 1988, after his arrest for trafficking in a class B controlled substance and unlawfully carrying a firearm. On July 13, 1989, he was convicted and given a four to seven year “from and after” sentence for the trafficking and firearm offenses (the “B” sentence). The plaintiff also then received a concurrent three to five year sentence which previously had been suspended for assault and battery of a correction officer. The plaintiff completed his A sentence on November 27, 1991, at which time he began serving his from and after B sentence.
On March 18, 1992, the Commissioner of Correction issued a memorandum indicating that as a result of a recent Superior Court decision, EGT credits of up to two and one-half days per month, earned between 1982 and August 1987, and previously disallowed, were to be awarded to “each inmate who is currently incarcerated, and who was incarcerated between 1982 and August 1987 for the same sentence that he/she is now serving. . . .” Pursuant to a Department of Correction policy memorandum issued in 1981, EGT credits were not awarded for participation in alcoholics anonymous and narcotics anonymous programs (AA/NA) between 1982 and 1987.3 In 1992, the plaintiff requested that he be given credit for 142.5 days4 of earned good time for his participation in AA/NA programs during his A sentence and prior to his parole. The denial of that request stimulated this action.
*692The judge, relying on Blake v. Massachusetts Parole Bd., 369 Mass. 701, 705 (1976), and M.C. v. Commissioner of Correction, 399 Mass. 909, 911 (1987), based his decision, in part, on grounds of mootness, since the plaintiff had finished his A sentence when he made his request for the EGT credits. He also concluded that repetition of the issues in the case were not likely to recur and that fairness principles did not dictate that the plaintiff receive the credits earned in a previous sentence once that sentence had been completed.
The plaintiff claims that his having been deprived of earned good time caused his A (maximum) sentence to be unlawfully lengthened by 142.5 days, and the commencement of his B sentence to be delayed by that number of days. He argues that “the very space in time in which the B sentence was supposed to run has been altered,” and that a favorable disposition will result in his release from custody 142.5 days sooner than otherwise. He maintains that this circumstance gives him a substantial personal stake in the outcome and that his complaint, therefore, is not moot.
Were our analysis to focus solely on the mechanics of applying the EGT credits and the logical effect of that application, the plaintiff’s arguments would have considerable persuasive force since the cases relied on by the judge to support his mootness conclusion involve claimants who had been released from prison and were not incarcerated at the time their claims were reviewed. Cf. Weinstein v. Bradford, 423 U.S. 147 (1975). Considerations of fairness and common sense, however, impel us to proceed on another basis.
There is no indication in our record that the plaintiff claimed any EGT credits before completing his A sentence. We are aware of no authority permitting credits earned, but not claimed, during an earlier sentence to be applied so as to reduce a subsequent sentence, either directly or indirectly by recalculation of the earlier sentence. Had the plaintiff not engaged in serious crime while on parole from his A sentence, his “lost” EGT credits would have been of no moment. The maximum aspect of the A sentence, against which credit is now claimed came into consideration only as a result of the *693plaintiffs criminality while on parole. It would offend common sense to allow that same criminal conduct effectively to reduce the sentence imposed for its commission.5 We discern an analogous approach to ours in former G. L. c. 127, § 129, which prevented a prisoner from benefiting from having committed a crime while on parole by prohibiting the aggregation of any sentence imposed for that crime with the sentence on which he was paroled.6 Given our decision, we need not address argued issues of entitlement, mootness, likelihood of repetition, or aggregation of sentences.
Judgment affirmed.
General Laws c. 127, § 129D, empowers the Commissioner of Correction to grant credits earned through participation in certain work, educational, vocational, and rehabilitation programs to be deducted from a prisoner’s parole eligibility date, and from his maximum sentence. See Burno v. Commissioner of Correction, 399 Mass. 111, 116, 119 (1987); Connery v. Commissioner of Correction, 33 Mass. App. Ct. 253 (1992), S.C., Connery v. Commissioner of Correction, 414 Mass. 1009 (1993).
“Although the judge’s determination can be viewed as a declaration of rights, we remind litigants and judges that, under G. L. c. 231 A, the judge should declare the rights of the parties, even on motions for summary judgment.” 146 Dundas Corp. v. Chemical Bank, 400 Mass. 588, 589 n.4 (1987).
In 1987, provision for EGT credits for participation in AA/NA programs was removed from department of correction regulations. See 103 Code Mass. Regs. § 411.08(1)(g) (1978) and 103 Code Mass. Regs. § 411.08(1)(a)-(d) (1987).
The plaintiff claims he had acquired EGT as follows: (1) twenty-five days from October 5, 1983, through August 5, 1984; (2) eighty-five days from August 5, 1984, through June, 1987; and (3) thirty-two and one-half days from June, 1987, through July, 1988.
It has been noted that “[deductions under [G. L. c. 127,] § 129D,... encourage activity that will.. . improve prisoners’ lives outside of prisons.” Burno v. Commissioner of Correction, 399 Mass. 111, 120 n.8 (1987). It would be ironic, indeed, if EGT credits earned in drug counselling programs should effectively be applied to a later imposed drug trafficking sentence.
General Laws c. 127, § 129, was repealed by St. 1993, c. 432, § 10, but was in effect at the time this action was brought. It provided in pertinent part: “If a prisoner has two or more sentences to be served concurrently or otherwise, the maximum period of time for which he may be held under his sentences shall be the basis upon which the deduction shall be determined; except that when a prisoner on parole is sentenced for a new crime, the sentence on which he was paroled shall be considered separately, and shall not be aggregated with any new sentence for the purposes of determining the deductions.”