Used addNewDocument() function to create documents.