delete and sort