add more sophisticated source search algorithm