sortedByInheritance