sorting cleanup