more or less working version of the scraper