modified scrape logic