Begun the work on the reset function