modified list_delete