Added voting logic