adding search string conversion function