updating sort