Changed nodes to document