Search function implemented successfully