adjust reset function