sorting figured out