update the swithes automatically