updated scrape logic