replaced resultService by documentService