added check for number of channels