scraper refactor