code update

Now it will not create a new document to clone the original object, all
done in one dom.