add sort order for in-place sorting