Place URL var outside of function.