improve channel implementation