Add a method for sorting collections into lists