switched from switch to channels and separate the data and error channels