put queues on the inputs and outputs