do switch outside of function and only for update--this is also problematic because it requires update be registered in order to allow switching...