Updating for linked list