a better way to check changes of url