how sorting on maps might work