Added back missing switch function.