updated sorting in test put