fixed syntax of switch