updated singly linked list