remove the switch function.
a switch function without a temporary variable.