changed url scraper into funtion and added incomplete check for existing urls