adding search function dialog