first funcional version of channels as input queues