addCandidate  function  in Candidate class