Update SortByFrequency