added extract and append methods on document implementations