add docstring and reset_zero option