config switch and intial branch done in logic