add reset function.