add switch example in basic