Added auto switching
Added auto switching