Added algorithm for stereo channels