This might run more efficiently if you were doing the switch on the numeric type instead of the stirng type.