Search function enhanced