check before adding search functionality