Add sort method to the mapper