updating sort order