optional implementation on Document constructor