test using switch statement