adding voteidx and cleaning votehist