polished the voting mechanism