refactored to load files and iterate through urls