added newDocumentGBK func