condensed scraping code into a single file