sort the category and tags