The Massachusetts state legislature will consider a bill that protects teen sexters from excessive prosecution while imposing harsher punishments on people who share nude photos with others without the subject’s consent. Filed by Gov. Charlie Baker on Tuesday, the bill would prevent prosecutors from charging teen sexters as child pornographers, recommending that they be sent to an educational program instead of prison or juvenile detention.

Current Massachusetts law allows minors caught with an underage peer’s naked photo to be charged with possession of child pornography; those who send their own naked photos to a lover could be charged with distribution. “These felony offenses are too severe a sanction for conduct that, while covered by the respective statutes, is not what lawmakers had in mind when they outlawed child pornography,” Baker wrote in a letter announcing the bill. “District attorneys and the attorney general will retain prosecutorial discretion to use the juvenile justice process in appropriate cases, but the default should be diversion rather than prosecution.”

In cases that prosecutors deem too serious for just a diversion program, Baker’s bill offers the option of a misdemeanor charge, which wouldn’t classify the minor as a “sex offender,” instead of a felony. It would also establish a requirement for schools to teach students about sexting in the context of “cyberbullying,” focusing on the effects of “harmful distribution” of sexual images, rather than the more innocuous, consensual sharing of sexts between lovers or flirtatious friends.

This bill represents a smart, sane response to an inevitable and largely harmless activity. Teens who use sexting as a precursor to sex or just a safe way to explore their desires aren’t victimizing anyone—they may even be learning about consent. Yet minors are still prosecuted for felonies for sexting in some states, even if they shared a photo of themselves or were on the receiving end of a message they didn’t solicit. Most states don’t have specific laws about sexting, leaving charges up to prosecutorial discretion, which may be influenced by parental or community pressure. Last year, a 17-year-old black boy in Louisiana who’d exchanged sexual videos with his white 16-year-old girlfriend was charged with contributing to the delinquency of a juvenile and possession of child pornography. His girlfriend was charged as a juvenile under the state’s sexting law; he was charged as an adult.

In recent years, several states have updated their criminal codes to establish gentler punishments for consensual teen sexting, after taking note of the prevalence of the practice and the incongruity of prosecuting a teen on child pornography charges for taking a nude photo of himself. It also seems inconsistent, though, to criminalize a non-physical expression of teen sexuality when most states don’t criminalize teen sex itself. The majority of states allow teens close in age to have consensual sex with one another without calling it statutory rape. But some states, even those whose laws recommend dialed-back sexting charges, still classify juvenile sexting as a misdemeanor. Others require participants to pay a fine or undergo some less-formal punishment. Why punish sexually-curious young people at all for an even less risky version of an act that’s not a crime to begin with?

The impulse to punish this kind of innocuous behavior comes from the belief that sexting leads to suicide and other tragedies or social ills. In reality, sexting only does damage when a person subjects someone else to unwanted images or shares someone else’s private photos without her consent. The bill Massachusetts will consider takes on the latter issue, sometimes called “revenge porn,” too. “We have laws punishing the non-consensual recording of sexually explicit images of unsuspecting people,” Baker wrote in his filing letter. “Our laws do not address, however, when a person takes a sexually explicit image or recording that was lawfully obtained and then distributes it with the intent to harm the person depicted and without that person’s consent.” If passed, the law will make this act a felony, giving survivors and district attorneys new tools for holding perpetrators accountable. Paired with the cyberbullying prevention program in schools, the new law against revenge porn could deter boys—yes, it’s usually boys—from committing sex crimes while letting harmless sexters do their thing in peace.