remove duplicates from linked list