refactored double_linked_chain