uniq: separate classes for sorted vs unsorted