format class relationship, sort order