implementing the channel creation logic