How states are countering the assault on elections