Implementing voting logic.