this will break if ref_channels is a str ie. one channel. Can you add a test for it too?