better switch behavior