Replace while with repeat and start url name check