use MapCompare for sorting