New implementation of chapter 2, using LinkedListNode