updating linked list