craeted new reset function