making doubly linked list