adding inputs and outputs