update the testcode of sort function