removing duplicates from a linked list