sorting by attributes is now correct and descending order remains
compositional