Added reset functionality (not tested)