rewrote a bit of channel mode