Similarly with this switch function.