Please help me understand the Search function