display the categories in a sorted manner