tidy up geturlvars to only run once