Use a for loop in voting