Added function to search candidates.