How ballot-marking devices work