Since you're keeping a reference to the last node, do you need to loop through all the nodes here?