sorter function for Relation