Added reset stuff to code and paper.