Adding a method to reset the internal state.