dydb: use switch in example