adding outputs and input values