Added search for location function