Adding a voting function