add duplicate removal method for doubly linked list