Added Switch code