removing all the nodes in a linked list with a given key