added switch structure