introduced range check for each channel