modify example,add UserSwitch sample code