switch to switch statement