use vars for switching and command