channels refactoring