change circuit with multiple inputs and multiple outputs into circuit only has no more than two inputs and outputs