fixed a switch case