making it work for urls on load