Rename and delete sum after using it for sorting