sort the categories