Added some code for Reset