modify the process for building the term hierarchy so that terms are displayed in alphabetical order