While I see the difference between the two pieces (the constructor called is moved, I know), the reason for the difference is not apparent from the code because as I have said, the use and type of the node variable is still not clear. I see you are calling node.add(), but I still don't see where else it is used in this code.