accumulator returns 1 if 1 is input