Using ksort to sort related items.