adding search to controller