channels refactoring2