fix and modify cdfind