The defendant was convicted of possession of marijuana as a first offense under G. L. c. 94C, § 34. The only question he raises in his appeal is whether his sentence, thirty days to be served in a house of correction, was precluded by the third paragraph of G. L. c. 94C, § 34. We hold that the sentence was properly imposed.
It may be helpful to set forth the statutory scheme of § 34 before examining the proceedings involving the defendant. The *54first paragraph of § 34 sets forth the penalties for unlawful possession of certain drugs, one of which is marijuana. The penalty for that offense is “imprisonment in a house of correction for not more than six months or a fine of five hundred dollars, or both.” The third paragraph, however, reflects “the manifest intent of the Legislature to treat first offenders less harshly.” Commonwealth v. Lupo, 394 Mass. 644, 649 (1985). It provides as follows:
“Notwithstanding any other penalty provision of this section, any person who is convicted for the first time under this section for the possession of marijuana . . . and who has not previously been convicted of any offense pursuant to the provisions of this chapter, or any provision of prior law relating to narcotic drugs as defined in said prior law shall be placed on probation unless such person does not consent thereto, or unless the court files a written memorandum stating the reasons for not so doing. Upon successful completion of said probation, the case shall be dismissed and records shall be sealed.”
The docket and the judge’s findings explain the circumstances leading to the defendant’s sentencing. After a complaint issued on September 1, 1998, the defendant admitted to sufficient facts to warrant a finding of guilty. See Commonwealth v. Duquette, 386 Mass. 834, 838-839 (1982). See also Smith, Criminal Practice and Procedure § 1202 (1983). A judge of the District Court continued the matter without a finding until March 19, 1999, on condition that the defendant be screened and found free of drugs and be counseled as required by the probation department. The probationary period proved unsuccessful; docket entries show that the defendant stipulated to a violation of probation based upon a new offense in Worcester and that, despite being sent to two treatment facilities, he continued to have positive screens for drugs. Finally, on March 5, 1999, a judge of the District Court (not the judge who had continued the matter without a finding) entered a guilty finding and sentenced the defendant to thirty days in the house of correction.
The docket indicates that, concurrent with his decision, the judge wrote a memorandum entitled “Written Memorandum for Not Placing Defendant on Probation Pursuant to G. L. c. 94C, sec. 34.” The memorandum summarizes the defendant’s failures to comply with the conditions of his probation. The defendant *55was arrested on a new charge for possession of marijuana in Worcester. The defendant “submitted to a violation” of his probation, and the matter was continued to December 18, 1998. On that date, the defendant appeared in court having had numerous positive screens for marijuana and cocaine. After completing one drug treatment program, he was placed in an assessment plan of the Franklin substance abuse intervention program, which required him to remain alcohol and substance free and to appear weekly at court. On numerous occasions during the assessment phase of the program, the defendant had positive screens for marijuana and cocaine. Because of the defendant’s “continuous use of marijuana and cocaine,” the judge determined that “treatment could not be effective at this time,” and stopped the defendant from participating further in the program. Concluding that the defendant was not suitable for further probation, the judge terminated the continuation without a finding, ordered entry of a guilty finding, and sentenced the defendant to thirty days in the house of correction.
We first dispose of the Commonwealth’s argument based on Commonwealth v. Christian, 429 Mass. 1022, 1023 (1999), that the appeal is not properly before this court because the defendant should have raised the illegality of his sentence in a motion under Mass.R.Crim.P. 30(a), 378 Mass. 900 (1979). Although in some circumstances that course is appropriate, the rule appears to be available only when a defendant seeks relief from a sentence “which he is then serving.” Commonwealth v. Lupo, 394 Mass. at 646. Rodwell v. Commonwealth, 432 Mass. 1016, 1018 (2000). An appeal may properly challenge an illegal sentence. See Commonwealth v. Sanchez, 405 Mass. 369, 379 n.7 (1989); Commonwealth v. Molino, 411 Mass. 149, 155 (1991). Cf. Commonwealth v. Lupo, 394 Mass. at 646-648. Since the defendant has already served his sentence, rule 30(a) is not an option.
The defendant argues that the statute must be construed to mean that if a sentence other than probation is imposed, the memorandum must be filed at the original time of disposition. The judge could not sentence him to the house of correction at a later time by filing a memorandum. The difficulty with the defendant’s argument is that the third paragraph of § 34 sets forth the penalty for “any person who is convicted for the first time” (emphasis supplied). Our cases, e.g., Commonwealth v. Duquette, 386 Mass. at 843; Commonwealth v. Jackson, 45 *56Mass. App. Ct. 666, 670 (1998); cf. Fire Chief of E. Bridgewater v. Plymouth County Retirement Bd., 47 Mass. App. Ct. 66, 71 (1999), as well as analogous statutory provisions, e.g., G. L. c. 278, § 18, and statutes cited in Commonwealth v. Pyles, 423 Mass. 717, 723 (1996), and even the statute at bar in its second paragraph, recognize that a continuation without a finding differs from a conviction. See Smith, Criminal Practice and Procedure § 1522. Until such time as a finding of guilty is entered on the docket, there is no conviction. If the defendant had complied with the conditions imposed, the complaint would have been dismissed and he would have avoided the consequences of a criminal conviction on his record. The fact that § 34, third par., provides that even after conviction, upon a successful completion of probation, the case is to be dismissed and the records sealed does not ehminate the distinction between a continuance without a finding and a conviction. Since there was no conviction until the judge entered the guilty finding, the statutory requirement was met by the issuance of a memorandum at that time.
The defendant also suggests that the requirement of a written memorandum in § 34 should be construed as only allowing a judge to forgo imposition of probation rather than justifying a period of incarceration. Not only does such a reading seem implausible, but we also consider this interpretation disposed of by implication in Commonwealth v. Lupo, 394 Mass. at 649.
Judgment affirmed.