Added Sorting-Function for bags