new sorting with position field