working on a reset function