nodeCopy() function complete