CD: switch instead of if/else