SCRAPING: fixed and converted to single function