adding the results of document()