remove duplicates from unsorted linked list