new sorting works properly