reorganizing code
make work connectivitySwitch
update for mergind