sort category by priority