refactor channel