added foreach to improve scraping speed.