added a random_channel helper function