added callback for url/endpoint change