sorting list and implement delete