including resend function