unused tempDocuments variable