better vote detection logic