Added support for document retrieval