implement option switching