switch statement updated