adding category sorting