voting code: currently getting an error