Adding function: crawlDocuments