new method introduced to addElectiodWithCandidates