remove duplicate nodes in a linked list