update password reset function