sort the map