add voting function