new method parse in CandidateFactory