sort at the insertion