code used to crawl