updating switch