added document type info and detector interface