cleaning up scraping code