added support for 4 channels