initialize document