sort references