Added support for 3-channels