Made a reset function