finish basic vote function