Add in- and output gates at setup