added extractchannel()