cleanup sorting