linked list updated with generic typing, iterator