Adding switch, moving code from laptop