added sorting to grouped_deliveries