url variable can be within if block