Added get and reset functionality.