add each for inputs