adding search method to textfield end editing