Modified vote function