Sort and map.