update dual direction linked list function