insert vote function