remove nodes from a linked list.