prepare for switch