finished doubly-linked list implementation