added sort for categories