sorting added to map and probably works