split out channel.js