put scraping into function
finished putting scraping in it's own function.