add resend function with xmpost