switch statement checking with an if statement exercise