(OTTAWA) New legislation introduced Wednesday will change the criteria that require sex offenders to be automatically added to the national whereabouts registry.

The change comes six months after the Supreme Court ruled it was unconstitutional to automatically add everyone convicted of sex crimes to the registry. In its decision last October, the court also invalidated the relevant parts of the Criminal Code.

The new law should automatically register repeat sex offenders and those who are considered serious sex offenders, but others could avoid being added if they demonstrate that they do not pose a risk to the community.

The nation’s highest court ruled that mandatory registration enacted with a 2011 Criminal Code amendment had gone “too far” because it targeted people who did not pose an increased risk of recidivism.

The new law would also add new entries to the list of offenses that can result in someone being recorded, including non-consensual sharing of intimate images and extortion.

It would also require judges to ask prosecutors if they sought a victim’s opinion when they requested a publication ban, which is a longstanding claim of victims’ support groups.

Under the new law, judges should also ask victims if they wish to continue to receive information about their cases after sentencing and ensure that their wishes are recorded in the record of court proceedings.