changed loop to do one url at a time