switch statement + test case fix