Changes to Search function