added create_document method