add sorting for categories