add channel switching function