Added Some Functionality to Search function