modified the update switch codes for test