last working state before remake
packet re-send introduced
added resend, seems to work