completed implement caoliu search function