Updated to add new sorting