add random-switch feature