added url updating function