added vote function