Update multi sort function