modify to handle configuration changes