linked list iteration saves state