This case presents a question primarily about the proper construction of a statute governing the submission of deoxyribonucleic acid (DNA) samples by certain convicted offenders, St. 2003, c. 107, § 2.
1. Background. The defendant, Robin Abrahams, appeals *151from his 2010 convictions for burglary with assault on an occupant, G. L. c. 266, § 14, and forcible rape of a child, G. L. c. 265, § 22A. In 1991, the fifteen year old victim was raped in her bedroom on the second floor of a two-story apartment building in Newburyport where she lived with her mother, stepfather, and eleven year old brother. The victim awoke in the early morning hours to see the rapist, who had broken into the apartment, “standing over” her. The victim did not scream or cry out because she was scared and feared the defendant would hurt her. She was afraid he would harm her mother as well. After the defendant raped the victim, he left through a window. The victim was taken to a hospital, where a sexual assault evidence collection kit was provided to the police. The police also took custody of the sheets that had been on the victim’s bed, among other things. As detailed below, more than fifteen years after the crimes, the defendant was identified as a suspect based on DNA evidence and, ultimately, convicted.
In 1993, a chemist at the State police crime laboratory identified seminal fluid in multiple areas of the victim’s bed sheets. In January, 2004, the laboratory sent a cutting from one of the sheets to Orchid Cellmark, a private company, for DNA analysis. On August 19, 2005, the defendant was brought to the Essex County correctional facility (correctional facility) from another State based on an outstanding Massachusetts warrant. On August 22, 2005, he was transported to the Newburyport District Court due to the outstanding warrant and was arraigned on charges unconnected to the case at bar: assault with intent to rape, burglary, and indecent assault and battery. Cash bail was set at $5,000. The defendant, unable to post bail, remained in the custody of the sheriff’s department and was transported back to the correctional facility where he was held as a pretrial detainee.
While he was being held, a judge in the Newburyport District Court sentenced the defendant to concurrent ten-day terms on convictions also unconnected to the case at bar: larceny under $250 and possession of a class D controlled substance. The defendant served the ten-day sentences on those convictions from October 20, 2005, to October 29, 2005, at the correctional facility. While serving those sentences, the defendant was ar*152raigned again, this time in the Essex Superior Court, on the unconnected charges of assault with intent to rape, burglary, and indecent assault and battery. Cash bail of $50,000 was set by the judge. On October 30, 2005, his sentences on the convictions for larceny and possession of a class D substance having been served, the defendant returned to pretrial detainee status on the unconnected charges of assault with intent to rape, burglary, and indecent assault and battery. He remained in custody at the correctional facility.
On November 2, 2005, an employee of the Essex County sheriff’s department obtained a sample of the defendant’s blood by pricking his finger. His blood sample was mailed to the Combined DNA Index System (CODIS) unit. In February, 2006, the CODIS unit determined that the DNA profile obtained from the defendant’s blood matched the DNA profile obtained from the bodily fluids on the cutting from the victim’s sheet that had been sent to Orchid Cellmark. The defendant was indicted for the 1991 rape and burglary, ultimately leading to his convictions in this case. Prior to trial, based on the CODIS match with the blood sample obtained on November, 2005, the Commonwealth obtained a court order to take a buccal swab1 to collect more DNA from the defendant. Another DNA profile was generated with biological material from that swab, which also linked the defendant to the DNA profile obtained from the victim’s sheet.
The defendant filed a motion to suppress the DNA results obtained from the November, 2005, blood sample and all fruits thereof, including the DNA evidence obtained from the court-ordered buccal swab, on the ground that the collection of his blood was not authorized by either of the two statutes governing the submission of DNA samples by certain convicted offenders, G. L. c. 22E, § 3, and St. 1997, c. 106, § 8.2 The *153motion was denied, and the defendant subsequently was convicted of the offenses from which he now appeals.
2. Discussion. DNA. Statute 2003, c. 107, § 2 (uncodified § 2), provides that “[a]ny person convicted of an offense punishable by imprisonment in the [S]tote prison . . . who is incarcerated in any prison [or] house of correction ... on the effective date of this act, notwithstanding the date of such conviction . . . and who has not previously submitted a DNA sample to the [State police] under chapter 22E of the General Laws, shall, within 1 year of the effective date of this act or before release from custody . . . whichever first occurs, submit a DNA sample to the [State police].” In Murphy v. Department of Correction, 429 Mass. 736, 743 (1999), the Supreme Judicial Court construed identical language in the predecessor to uncodified § 2 referring to incarceration “on the effective date of this act” to mean “on or after” the effective date. As the parties both postulate, the language in uncodified § 2 must also be construed that way.
There is no dispute that the defendant was “convicted of an offense punishable by imprisonment in the [S]tote prison,” because in 1988 he was convicted of open and gross lewdness. Nor is there any dispute that from October 20 to October 29, 2005, he was “incarcerated” on the larceny and possession of a class D substance convictions. All agree that incarceration includes, at the least, time in a prison or house of correction serving a sentence.
The defendant argues, however, that, as the judge below concluded, an individual is not “incarcerated” when held as a pretrial detainee. He relies on cases, including Commonwealth v. Donohue, 452 Mass. 256 (2008), and Commonwealth v. Gillis, 448 Mass. 354 (2007), which, he says, “us[e] ‘incarceration’ solely in reference to persons committed to correctional facilities as a result of conviction.” He argues, based on this premise, that because his incarceration ended on October 29, 2005, the collection of a DNA sample by an employee of the Essex County sheriff’s department on November 2, 2005, came after the deadline articulated in uncodified § 2, and was therefore unlawful.
*154To begin with, although uncodified § 2 imposes an early deadline for submission of a DNA sample by someone in the defendant’s position, there are substantial questions whether that deadline limits the authority of the Commonwealth to request such a sample and, if so, whether suppression is available as a remedy for the collection of a sample beyond the deadline. The apparent purpose of uncodified § 2 is to ensure that certain convicted individuals provide DNA samples to the Commonwealth at an early date and, in any event, before release from custody. This timing ensures that the Commonwealth will have these individuals’ DNA profiles on record in the event they commit further crimes after release. Uncodified § 2 does not provide any mechanism for submission of a DNA sample, and the criminal sanction contained in G. L. c. 22E, § 11, applies only to refusal to submit to a request for DNA rather than to a mere failure to submit DNA. However, in light of the purpose of uncodified § 2, the proposition that a late request for DNA made after the deadline for its submission by a convicted individual would be unlawful in a way that would prejudice that defendant’s rights and thus require the suppression of the evidence, questions we need not decide, is not self-evident. See Commonwealth v. Grimshaw, 413 Mass. 73, 77-78 (1992) (“Generally, evidence seized in violation of the law will be suppressed only if the violation is substantial or rises to the level of a Federal or State constitutional violation”). The defendant does not claim any constitutional violation, though he does assert that there was a substantial violation of his rights.
In any event, even assuming that late collection of DNA evidence by the Commonwealth in some circumstances might be deemed unlawful and might require the resulting DNA evidence to be suppressed, and further assuming that the defendant’s “incarceration” ended on October 29, 2005, before his DNA was collected, the defendant has not demonstrated that the collection here took place after the deadline in uncodified § 2.
To be sure, it was the incarceration of the defendant that brought him within the requirement of uncodified § 2 that he submit a DNA sample. But the statute does not require that the submission occur before release from “incarceration.” It uses a different word; it states that the DNA sample must be submitted *155before release from “custody.” There can be no doubt that, regardless of whether his incarceration ended on October 29, 2005, the defendant remained in custody, and his DNA was collected prior to his release from that custody. Consequently, the judge correctly denied the defendant’s motion to suppress.3
Other claims. Our conclusion that the DNA evidence was properly admitted disposes of the defendant’s second claim, concerning the photographic identification of the defendant by the victim. He argues that the victim’s identification of his photograph was tainted by the fact that she was told that the defendant, whose DNA matched that of the rapist, was the brother and cousin of two people she knew. Even assuming error, however, the other evidence in this case on the question of identity was overwhelming. We therefore conclude that any error with respect to the photographic identification by the victim was harmless beyond a reasonable doubt. See Commonwealth v. Vasquez, 456 Mass. 350, 360 (2010), quoting from Chapman v. California, 386 U.S. 18, 24 (1967) (“Before a ‘[Fjederal constitutional error can be held harmless, the court must be able to declare a belief that it was harmless beyond a reasonable doubt’ ”).
Finally, the defendant claims error based on the use of the phrase “rape kit” during the trial. The prosecutor and a police officer each used the phrase “rape kit” once to describe the evidence collection kit that was used in this case. Following both mentions of the phrase, the defendant objected and the judge immediately issued a curative instruction. As the defendant did not take exception to the instructions, we review for a substantial risk of a miscarriage of justice. See Commonwealth v. Beaudry, 445 Mass. 577, 587 (2005) (while objection generally preserves right of appeal, when objection is followed by curative instruction and defendant does not object to instruction, any error is reviewed for substantial risk of miscarriage of justice). We conclude that the curative instructions were sufficient to prevent such a risk as the judge stressed that the name *156of the kit had no evidentiary value and the jury were the sole and exclusive judge of the facts.
Judgments affirmed.
“A buccal swab . . . test involves the rubbing of a swab on the interior surface of the cheek to obtain cells that are then evaluated ... for [DNA] analysis.” Doe v. Senechal, 431 Mass. 78, 79 n.4, cert, denied, 531 U.S. 825 (2000).
Although St. 1997, c. 106, § 8, was repealed by implication by the enactment of St. 2003, c. 107, § 2, see Commonwealth v. Bloomberg, 302 Mass. 349, 352 (1939), the relevant language was not changed. We therefore refer to the 2003 statute when describing the defendant’s argument.
As we conclude that the blood sample was authorized by uncodified § 2, we do not address the defendant’s argument that the sample was not authorized by G. L. c. 22E.