fixed switch statement