rest looks good but we could move this out to the "root" of the file and just call it `function cloneNode` since it doesn't need the closure