put references in alphabetical order