adding search option functionality