code works with only one voter