Created vote function