fix to get the url each time through the loop

and remove a print statement.