Use associative array instead of switch statement.