moved sortedValues class