url variable out of the loop