finish voting functin