updated switch.php