added reset function