working on complete document analysis