added len and cap for channels