add resend with timeout logic