Update switch-function behave