detect change in power source