refactor methods in scraper