fix switch statement