switch statement fixed