make sorting more friendly for categories