changed some of the featureGenerator code.
CollectionSorting