remove duplicates from a sorted linked list