switch flag