sorting and searching for map view