small modification in the switch