the update should not be a local variable in order to be able to call reset  (see #101)