update change switch logic