add input and output