put categories in alphabetical order and ignore unused ones