edit candidate method